I have a git repository that looks like this:
A <- B <- C <- D <- HEAD
I want the head of the branch to point to A, i.e. I want B
In my opinion a very easy and clean way could be:
git checkout -f A
git symbolic-ref HEAD refs/heads/master
git commit