Jeroen van Baarsen

September 12, 2017
How to revert a branch merge

Today my co-worker asked me: “Do you know how to revert a branch merge”. My first reaction was: “Yeah ofcourse”, but when I tried it, I came to the conclusion that I did not know how to fix this. Probably because its not something you have to do very often.

Well, it turns out to be very simple: git reset --hard HEAD^ does the trick!