Made a merge on a wrong branch?

If you have made a wrong merge, use the following command to undo the merge.

git reset –hard HEAD^

That’s it! Simple but effective…

Note: Don’t forget to add the ^ sign at the end of the command. It’s a known as a “Relative Commit Reference” and indicates “the parent commit”.