HowTo: Fix HEAD detached in git

git checkout -b temp
git branch -f master temp
git checkout master
git branch -d temp
git push origin master