In Linux, my favorite merge tool is Meld, and I\'ve had no problems using or configuring it to work with Git. However, in Windows it has been a different story.
Fir
You can use these two commands (as Arugin says)--using the proper path to Meld.exe:
git config --global merge.tool meld
git config --global mergetool.meld.path "C:\Program Files (x86)\Meld\Meld.exe"
OR you can just edit your C:\Users\YOUR_USER_NAME\.gitconfig file directly and add the following to the end of it:
[merge]
tool = meld
[mergetool "meld"]
path = C:\\Program Files (x86)\\Meld\\Meld.exe
Now call git difftool in Git Bash for Windows and Meld will open up as your default difftool viewer.
UPDATE 20 Sept. 2019:
- I might as well put the Linux version here too for my own reference in one place if nothing else:
For Linux it's super easy too:
sudo apt update
sudo apt install meld
gedit ~/.gitconfig # edit your ~/.gitconfig file (gedit GUI editor will open)
Then add to the bottom of the .gitconfig file:
[diff]
tool = meld
That's it! git difftool now works on Linux Ubuntu!