How to setup kdiff3 in Mac OS?

kdiff3 is generally located at the following location:

/Applications/kdiff3.app/Contents/MacOS/kdiff3

so, try

[difftool "kdiff3"]
    path = /Applications/kdiff3.app/Contents/MacOS/kdiff3

If you installed kdiff using brew, then you'd not need the difftool parameter in config for git 1.8 onwards. Just the following would work:

[diff]
    tool = kdiff3

If you installed kdiff mounting the dmg file to kdiff.app then set your local path as following:

[difftool "kdiff3"]
    path = directory_path_where_you_installed/kdiff3.app/Contents/MacOS/kdiff3

  1. Download kdiff3 and install as app(drag and drop the kdiff3 into your Applications): http://sourceforge.net/projects/kdiff3/files/kdiff3/0.9.98/kdiff3-0.9.98-MacOSX-64Bit.dmg/download

  2. Setup git config tool as following, works for me on MacBook Pro:

git config --global merge.tool kdiff3

and:

git config --global mergetool.kdiff3.cmd '/Applications/kdiff3.app/Contents/MacOS/kdiff3 $BASE $LOCAL $REMOTE -o $MERGED'