I have to admit that I haven't played with gits advanced features but on my current project I had to.
The situation: Someone tried to implement some features and comitted them to the master, now I was called to do what this other person tried to do (but failed), therefore, the first thing I did was
git checkout -b clean_start HASH
Hash is a correct SHA1 hash of about 20 commits before the current master and that worked. I now made some changes to this branch and am now at a point where I'd like to change the current master branch of remote repository (that has the changes made by the other person) to my local branch.
In other words, I'd like to move the head of the master 20 commits back and then merge my new clean branch into it.
Is that exactly what I have to do? With revert HEAD~20 etc. or is there a command that makes exactly such a head move?