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
Schuess, be careful for space character in directories!
[merge]
tool = meld
[mergetool "meld"]
prompt = false
keepBackup = false
keepTemporaries = false
path = C:/Program Files (x86)/Meld/Meld.exe
cmd = \"/C/Program Files (x86)/Meld/Meld.exe\" \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" \"--output=$PWD/$MERGED\"
Why do you not use git bash for Windows?
After install meld simply:
git config --global merge.tool meld
git config --global mergetool.meld.path "C:\Program Files (x86)\Meld\Meld.exe" <- path to meld here
Thats all!
I had the exact same problem and found I had to brute force my way to get it to work. Here is what I put in my .gitconfig file. (Note my meld executable is in a different location)
[merge]
tool = meld
[mergetool "meld"]
cmd = "/c/Meld/meld/meld.exe $PWD/$LOCAL $PWD/$BASE $PWD/$REMOTE --output=$PWD/$MERGED"
For some reason, in Windows 10 the PATH environmental variable could not be set properly during the installation, so a strange exception is raised saying that it is not able to find some .dll that are under "C:\Program Files (x86)/Meld/bin" directory.
A workaround for me was, execute in git bash:
export PATH=$PATH:"/C/Program Files (x86)/Meld/lib"
Or add to windows PATH
C:\Program Files (x86)/Meld/bin
None of the answers worked for me. I ended up with this in the .gitconfig-file:
[merge]
tool = meld
[mergetool "meld"]
cmd = 'C:/Program Files (x86)/Meld/Meld.exe' $LOCAL $BASE $REMOTE --output=$MERGED
[mergetool]
prompt = false
After a git merge mybranch
ending with conflicts, you simply type git mergetool
and meld opens. After a save, you have to commit in git and the conflicts are resolved.
For some reason, this only worked with Meld 3.18.x, Meld 3.20.x gives me an error.
I too faced similar issue.Operating system used is Windows 10 and the following changes worked for me.It seems more like path issue
git config --global mergetool.meld.path "/c/Program Files (x86)/Meld/Meld.exe" <- path to meld here