Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><code>git mergetool</code> is fully configurable so you can pretty much chose your favourite tool.</p> <p>The full documentation is here: <a href="http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html" rel="noreferrer">http://www.kernel.org/pub/software/scm/git/docs/git-mergetool.html</a></p> <p>In brief, you can set a default mergetool by setting the user config variable <code>merge.tool</code>.</p> <p>If the merge tool is one of the ones supported natively by it you just have to set <code>mergetool.&lt;tool&gt;.path</code> to the full path to the tool (replace <code>&lt;tool&gt;</code> by what you have configured <code>merge.tool</code> to be.</p> <p>Otherwise, you can set <code>mergetool.&lt;tool&gt;.cmd</code> to a bit of shell to be eval'ed at runtime with the shell variables <code>$BASE, $LOCAL, $REMOTE, $MERGED</code> set to the appropriate files. You have to be a bit careful with the escaping whether you directly edit a config file or set the variable with the <code>git config</code> command.</p> <p>Something like this should give the flavour of what you can do ('mymerge' is a fictional tool).</p> <pre><code>git config merge.tool mymerge git config merge.mymerge.cmd 'mymerge.exe --base "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"' </code></pre> <p>Once you've setup your favourite merge tool, it's simply a matter of running <code>git mergetool</code> whenever you have conflicts to resolve.</p> <p>The p4merge tool from Perforce is a pretty good standalone merge tool.</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