An overview of the different external git diff and merge tools, and how to configure them.
Occording to the GIT book, GIT supports these external Diff / Merge tools:
|GIT tool name||Name (and link to website)||License|
|[bc3]||Beyond Compare 3||Commercial|
|[emerge]||Emerge (Emacs)||Open source|
|[meld]||Meld merge||Open source|
|[opendiff]||opendiff||(OS X Developer Tools)|
- TortoiseMerge: only merge tool
- Kompare: only diff tool
You can choose your prefered diff / merge tool by executing this command (Windows or Linux), in this case for my favorite kdiff3.
git config --global diff.tool kdiff3 git config --global merge.tool kdiff3
The external diff is started using this command:
You will probably get the error
The diff tool kdiff3 is not available as 'kdiff3'. External diff died, stopping at <filename>.,
because GIT doesn’t find your tool. This can be resolved by adding your tool to the environment PATH variable, or by telling
GIT where to find your tool(s):
git config --global difftool.kdiff3.path "C:/Program Files (x86)/KDiff3/kdiff3.exe" git config --global mergetool.kdiff3.path "C:/Program Files (x86)/KDiff3/kdiff3.exe"
Any configuration can be undone by executing:
git config --global <config item> --unset
git config --global mergetool.kdiff3.path --unset