Created
August 5, 2013 19:08
-
-
Save shawndumas/6158524 to your computer and use it in GitHub Desktop.
Using WinMerge as the git Diff/Merge Tool on Windows 64bit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mergetool] | |
prompt = false | |
keepBackup = false | |
keepTemporaries = false | |
[merge] | |
tool = winmerge | |
[mergetool "winmerge"] | |
name = WinMerge | |
trustExitCode = true | |
cmd = "/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe" -u -e -dl \"Local\" -dr \"Remote\" $LOCAL $REMOTE $MERGED | |
[diff] | |
tool = winmerge | |
[difftool "winmerge"] | |
name = WinMerge | |
trustExitCode = true | |
cmd = "/c/Program\\ Files\\ \\(x86\\)/WinMerge/WinMergeU.exe" -u -e $LOCAL $REMOTE |
For folks like me who really don't like WinMerge 3-way UI, but are fine with 2-way UI:
[mergetool "winmerge"]
name = WinMerge
trustExitCode = true
cmd = \"C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe\" \"$REMOTE\"
This makes WinMerge parse the conflicts and show a 2-way UI where the left hand side ("Mine") is what eventually saved to the file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally this worked for me
[mergetool "winmerge"]
name = WinMerge
trustExitCode = true
cmd = ""C:/Program Files (x86)/WinMerge/WinMergeU.exe" "$LOCAL" "$REMOTE" "$MERGED" >/dev/null 2>&1"
[diff]
tool = winmerge
[difftool "winmerge"]
name = WinMerge
trustExitCode = true
cmd = ""C:/Program Files (x86)/WinMerge/WinMergeU.exe" "$REMOTE" "$LOCAL" >/dev/null 2>&1"
command to diff
"git difftool"
and from winmerge I manually merge with winmerge functionality