title: How to stop merging in git?
body: <p>I had a three-way-merge branch merge:</p>
  
  <pre><code>git checkout master
  git merge BranchA
  
  &gt;&gt; Fast-forward merge
  
  git merge BranchB
  
  &gt;&gt; Three-way-merge (prompts for a merge commit message)
  </code></pre>
  
  <p>My questions are two:</p>
  
  <ul>
  <li><p><strong>How can I abort the merging?</strong> With the three-way-merge I'm showed the editor where to write the merge-commit message.
  But if I exit without saving, <em>git</em> will anyway proceed with the merge (just the merge-commit message will be the default one instead the one I could have written but aborted)</p>
  
  <pre><code>commit 11111233
      Merge 'BranchB' into master
  </code></pre>
  
  <p>while, obviously not having confirmed the commit message, I would expect the merge to not happen (as the same behaviour of when I do NOT confirm a normal commit message)</p></li>
  <li><strong>Will the commits from the two merged branches be sorted in chronological order</strong>?
  Or first (in the <code>git log</code>) will I see the commit from the <strong>BranchA</strong>, followed THEN from the commits of the <strong>BranchB</strong>?</li>
  </ul>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <p>To explain better the second question I made a test:
  2 branches (A and B) starting from the <em>master</em> branch. I made a commit on B, then on A, then again on B, and finally again on A.
  Then I merged <em>BranchA</em> into <em>master</em>. And then <em>BranchB</em> into <em>master</em>.</p>
  
  <p>But when I <code>git log</code> on <em>master</em>, this is what has come out, and why I asked the second question:</p>
  
  <pre><code>commit 730fdd4d328999c86fa4d3b6120ac856ecaccab1
  Merge: 7eb581b cc1085a
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Mon Feb 9 21:24:27 2015 +0100
  
      Merge branch 'BranchB' into master_COPY
  
  commit 7eb581b39a8402e1694cc4bf4eab4a3feb1143f8
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Mon Feb 9 21:23:18 2015 +0100
  
      BranchA) - This should be the (second) last change of the branch, and be the
      most recent into the git log, even if I merge another branch into master,
      AFTER the one where we are committing this.
  
  commit cc1085a6aaa2ee4b26d3c3fbb93bee863d9e7c28
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Mon Feb 9 21:20:29 2015 +0100
  
      (BranchB) - Add settings to the last new features
  
  commit 5f5b846a2f89886d01244ba77af941f554233b51
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Mon Feb 9 21:18:54 2015 +0100
  
      (BranchA) - Add some changes
  
  commit 92a57a56b6b7c9694fbedda71b8070fc58683dde
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Mon Feb 9 21:18:17 2015 +0100
  
      (BranchB) - Some changes
  
  commit 221765476e348833cf8da73b1bf5239f3d4240e8
  Author: Arthur Conandoyle &lt;Arthur.Conandoyle@live.com&gt;
  Date:   Tue Feb 3 12:12:19 2015 +0100
  
      Change (this is the last commit of the parent 'master' branch)
  </code></pre>
  
  <p>(As <em>Srdjan Grubor</em> wrote) I would have been expected first (chronologically) all the commit from the merged <em>BranchA</em> and <strong>THEN</strong> all the commits from the merged <em>BranchB</em>, following the order of merging...
  .. but it's funny how the <code>git log</code> instead show them in chronological order and the commits are not shown as grouped in branches!</p>