If a HEAD has to be reset to a older version this is a possible workflow.
The solution is from stackoverflow
First checkout the version that should be the new HEAD.
git checkout <SHA-1 id of commit>Now we create a temp branch and check it out.
git checkout -b tempThis is equivalent to git branch temp followed by git checkout temp.
Now we want master (or an other branch) to point to it.
git checkout -B master tempThis is equivalent to git branch -f master tempfollowed by git checkout master.
Now we can delete the temp branch:
git branch -d tempNow we can push to a remote (-f might be needed):
git push -f origin master