title: How do you revert a faulty git merge commit
body: <p>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.</p>
  <p>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.</p>
  <p><img src="https://i.stack.imgur.com/fS0va.png" alt="alt text" /></p>
  <p>What I want to do is revert the faulty merge. So from master I try to run <code>git revert -m 1 &lt;sha1sum of faulty merge&gt;</code> but then git responds with:</p>
  <pre><code># On branch master                               
  nothing to commit (working directory clean)
  </code></pre>
  <p>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.</p>
  <p>Is this a git bug, or am I missing something?</p>