git revert
alone won\'t work. -m
must be specified, and I\'m pretty confused about it.
Anyone experienced this before?<
The correctly marked answer worked for me but I had to spend some time to determine whats going on.. So I decided to add an answer with simple straightforward steps for cases like mine..
Lets say we got branches A and B.. You merged branch A into branch B and pushed branch B to itself so now the merge is part of it.. But you want to go back to the last commit before the merge.. What do you do?
git log
You will see the history of recent commits - the commits have commit/author/date properties while the merges also have a merge property - so you see them like this:
commit:
Use git log
and git log
- you will see the commit histories of those parent branches - the first commits in the list are the latest ones
of the commit you want, go to your git root folder and use git checkout -b
- that will create a new branch starting from that last commit you've chosen before the merge.. Voila, ready!