I have Git on mac OSX Snow Leopard and I tried to edit my merge and diff tool to use kdiff3 instead of emerge.
But when I try to use it does not launch the GUI of kdiff and keeps me with a cmd based interface.
My setting in gitconfig are:
[merge]
tool = kdiff3
[mergetool "kdiff3"]
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3
args = $base $local $other -o $output
trustExitCode = false
[diff]
tool = kdiff3
[difftool "kdiff3"]
cmd = /Applications/kdiff3.app/Contents/MacOS/kdiff3
args = $base $local $other -o $output
trustExitCode = false
There is obviously something missing but what did I do wrong ?
Recent Git versions have built-in support for
kdiff3, so there’s no need to configure it manually using the generic cmd and args settings. Instead do:And if
kdiff3is not in your PATH environment also do:This makes
git mergetoollaunchkdiff3. Note that there is no way to configure Git to automatically launch your merge tool after a manual merge that has conflicts.In case you really want to see how Git is calling
kdiff3internally, take a look at the built-in mergetool configuration for kdiff3.Edit: For Beyond Compare 4, which now also supports Mac OS X, simply exchange
kdiff3withbc3(yes, “3”) and adjust the path in the above lines. Starting with Git 2.2.0 you’ll be able to usebcas an alias forbc3so that you do not have to care about the version number.