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
First be sure that your working copy is not modified. Then:
git diff --binary HEAD commit_sha_you_want_to_revert_to | git apply
and then just commit. Don't forget to document what's the reason for revert.