Wednesday, February 22, 2012

Installing Kdiff3 version control mergetool for Git

kdiff3 is a great GUI mergetool for git. However the installation is more tedious in Windows compared to Linux. Below is instruction on how to install it in Windows.

Download and install program:
http://sourceforge.net/projects/kdiff3/

Add kdiff3 as your Git mergetool
From Git Bash, run
$ git config --global merge.tool kdiff3

Open the file repository/.git/config
and paste the code below


[merge]
tool = kdiff3
[mergetool "kdiff3"]
path = C:/Program Files/KDiff3/kdiff3.exe
keepBackup = false
trustExitCode = false





tags:
git mergetool kdiff3 windows
kdiff3 mergetool is not available
better than vimdiff

4 comments:

  1. Thanks for this info. I suddenly can't start using kdiff3 as a mergetool on my Win7 machine and was wondering if it ever happened to you.

    I validated my .gitconfig based on your post but that does not do the trick.
    I can start kdiff3 from the command prompt without any problem.

    Any ideas?

    Cheers,

    Eric

    ReplyDelete
  2. MIND THE SLASHES! If you use windows style path C:\Program Files (x86)\KDiff3\kdiff3.exe it will cause an error. Use / slashes instead of \ slashes.

    ReplyDelete
  3. This simply doesn't work for me. I'm in the same boat as Eric above. I can launch it fine from the command prompt, i get no warnings of any kind, but git will not launch kdiff3 for me.

    ReplyDelete