title: Git: Reseting a merge commit
body: <p>Let's say there are two branches in hand:</p>
  
  <p>master:</p>
  
  <pre><code>0--1--2
  </code></pre>
  
  <p>dev:</p>
  
  <pre><code>0--1--3
  </code></pre>
  
  <p>So we merge dev into master, and we end up with the merge commit <code>4</code> with the two parent commits <code>2</code> and <code>3</code>:</p>
  
  <pre><code>0--1----2---4
      \--3---/
  </code></pre>
  
  <p>Now, if we get rid of the merge commit via <code>git reset --soft head~1</code>, we end up with the following log:</p>
  
  <pre><code>0--1--2
  </code></pre>
  
  <p><strong>Question</strong> is: why does git decide to remove commit <code>3</code> but not commit <code>2</code>?</p>