So one of my coworkers accidentally made a merge that actually only kept one side of the tree. So he started a merge, deleted all the changes introduced by the merge, and then committed the merge.
Here is a simple test case I did on a test repo. This repo has three branches. idx is the topic branch that was accidentally merged, and master is the mainline. dev is just a test of how revert -m works so you can ignore it.
What I want to do is revert the faulty merge. So from master I try to run git revert -m 1 <sha1sum of faulty merge>
but then git responds with:
# On branch master
nothing to commit (working directory clean)
So it doesn't actually create a revert commit that undoes the merge. I believe that this happens because the merge didn't actually contain any real changes.
Is this a git bug, or am I missing something?