I\'ve merged a master branch from a friend\'s repository into my working directory into branch_a using:
git pull my_friend master
I\'ve discove
After the pull, HEAD
has been moved to the latest commit, which is the merge commit bringing the two branches together, not the commit that you last worked on. So this is why reset HEAD
won't change anything.
revert HEAD
isn't what you want to do either, because that is attempting to create a new commit reverting the changes of the merge commit. (This is why you see an error; you can't revert a merge commit without telling git which of the two parent commits you want to return to.)
I think what you want is:
git reset [--hard] HEAD^
which will reset to the commit before the merge commit.