Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As far as I know, <del>you won't be able to commit while a file still contain conflict markers in it.</del>... which is not exactly true:<br> The OP mentions that you can (I copy here <a href="http://pastebin.com/KKLtCZ35" rel="nofollow noreferrer">his pastbin</a>), but that won't be enough for the mergetool to be trigger again:</p> <pre><code>Auto-merged README CONFLICT (content): Merge conflict in README Automatic merge failed; fix conflicts and then commit the result. lynx:~/test_clone$ ls README lynx:~/test_clone$ git add README lynx:~/test_clone$ git commit -a Created commit 46ee062: It works! lynx:~/test_clone$ ls README lynx:~/test_clone$ cat README &lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD:README testingtesting ======= hmm &gt;&gt;&gt;&gt;&gt;&gt;&gt; 881d60f5f738bc5716f5c9a9384e262b535717fd:README lynx:~/test_clone$ </code></pre> <p>As <a href="https://stackoverflow.com/users/19563/charles-bailey">Charles Bailey</a> comments, and illustrates in this <a href="https://stackoverflow.com/questions/101752/aborting-a-merge-in-git">SO answer</a>, <strong>the mergetool is queried because there are 3 instances of the same file <em>in the index</em></strong>:</p> <blockquote> <p>For an unmerged file in a conflict git makes available the common base, local and remote versions of the file in the index. (This is where they are read from for use in a 3-way diff tool by <code>git mergetool</code>.) You can use git show to view them:</p> </blockquote> <pre><code># common base: git show :1:afile.txt # 'ours' git show :2:afile.txt # 'theirs' git show :3:afile.txt </code></pre> <p><code>git add</code> (with whatever content, including conflict markers) will automatically removes 2 of them, ensuring the <code>mergetool</code> <em>won't be</em> called again.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload