Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save SHSharkar/6ee47720c97e2c4d52801f57605f2c29 to your computer and use it in GitHub Desktop.
Save SHSharkar/6ee47720c97e2c4d52801f57605f2c29 to your computer and use it in GitHub Desktop.
Setting Meld as default GIT diff tool in Windows Operating System

Update .gitconfig file located in C:\Users\USERNAME directory with the following data.

[diff]
	tool = meld
[difftool]
	prompt = false
[difftool "meld"]
	path = C:\\Program Files (x86)\\Meld\\Meld.exe
	cmd = 'C:\\Program Files (x86)\\Meld\\Meld.exe' "$REMOTE" "$LOCAL"
[merge]
	tool = meld
[mergetool]
	prompt = false
[mergetool "meld"]
	path = C:\\Program Files (x86)\\Meld\\Meld.exe
	cmd = 'C:\\Program Files (x86)\\Meld\\Meld.exe' "$REMOTE" "$MERGED" "$LOCAL" --output "$MERGED"

If you encounter this error under Windows /mingw64/libexec/git-core/git-mergetool--lib: line 124: c:/Program Files (x86)/Meld/Meld.exe: Permission denied uncheck 'Run as Administrator' in Properties -> Compatibility of Meld.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment