Joseph Joseph - 9 months ago 114
Git Question

Git: How configure KDiff3 as merge tool and diff tool

Recently I was using GitExtension 2.46, but the Git version that has the same is 1.9.4.msysgit.2. Willing to use only Git commands, I uninstalled GitExtension and install the latest version available of Git and KDiff3.

When I make a merge and have conflicts, I run the following command:

$ git mergetool

Then I receive the message:

The merge tool kdiff3 is not available as 'kdiff3'.

I guess it must be by the KDiff3 path.


  • OS: Windows 10

  • Git

  • KDiff3 0.9.98 (64 bit)


  • What do I have to configure in the .gitconfig file for the command
    $ git mergetool
    to open the KDiff3 GUI with the versions LOCAL, REMOTE, BASE and MERGED of conflicted file?

  • How configure it to use it has diff-tool?


These sites were very helpful, almost, mergetool and difftool. I used the global configuration, but can be used by repository without problems. You just need to execute the following commands:

git config --global --add merge.tool kdiff3
git config --global --add mergetool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add mergetool.kdiff3.trustExitCode false

git config --global --add diff.guitool kdiff3
git config --global --add difftool.kdiff3.path "C:/Program Files/KDiff3/kdiff3.exe"
git config --global --add difftool.kdiff3.trustExitCode false