Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To follow-up on Charles Bailey's answer, here's my git setup that's using <a href="http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools" rel="noreferrer">p4merge</a> (free cross-platform 3way merge tool); tested on msys Git (Windows) install:</p> <pre><code>git config --global merge.tool p4merge git config --global mergetool.p4merge.cmd 'p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"' </code></pre> <p>or, from a windows cmd.exe shell, the second line becomes :</p> <pre><code>git config --global mergetool.p4merge.cmd "p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"" </code></pre> <p>The changes (relative to Charles Bailey):</p> <ul> <li>added to global git config, i.e. valid for all git projects not just the current one</li> <li>the custom tool config value resides in "mergetool.[tool].cmd", not "merge.[tool].cmd" (silly me, spent an hour troubleshooting why git kept complaining about non-existing tool)</li> <li>added double quotes for all file names so that files with spaces can still be found by the merge tool (I tested this in msys Git from Powershell)</li> <li>note that by default Perforce will add its installation dir to PATH, thus no need to specify full path to p4merge in the command</li> </ul> <p>Download: <a href="http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools" rel="noreferrer">http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools</a></p> <hr> <p><strong>EDIT</strong> (Feb 2014)</p> <p>As pointed out by <a href="https://stackoverflow.com/users/216063/gregory-pakosz">@Gregory Pakosz</a>, latest <a href="http://msysgit.github.io/" rel="noreferrer">msys git</a> now "natively" supports <strong>p4merge</strong> (tested on <em>1.8.5.2.msysgit.0</em>).</p> <p>You can display list of supported tools by running:</p> <pre><code>git mergetool --tool-help </code></pre> <p>You should see <em>p4merge</em> in either <em>available</em> or <em>valid</em> list. If not, please update your git.</p> <p>If <em>p4merge</em> was listed as <em>available</em>, it is in your <em>PATH</em> and you only have to set <em>merge.tool</em>:</p> <pre><code>git config --global merge.tool p4merge </code></pre> <p>If it was listed as <em>valid</em>, you have to define <em>mergetool.p4merge.path</em> in addition to <em>merge.tool</em>:</p> <pre><code>git config --global mergetool.p4merge.path c:/Users/my-login/AppData/Local/Perforce/p4merge.exe </code></pre> <ul> <li>The above is an example path when p4merge was installed for the current user, not system-wide (does not need admin rights or UAC elevation)</li> <li>Although <code>~</code> should expand to current user's home directory (so in theory the path should be <code>~/AppData/Local/Perforce/p4merge.exe</code>), this did not work for me</li> <li>Even better would have been to take advantage of an environment variable (e.g. <code>$LOCALAPPDATA/Perforce/p4merge.exe</code>), git does not seem to be expanding environment variables for paths (if you know how to get this working, please let me know or update this answer)</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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