Tag Archives: winmerge

Using WinMerge as difftool on cygwin/git

Last couple of weeks i have been using Git on cygwin and i got very satisfying results out of it. One thing that i wanted to tweak was the ability to use WinMerge to compare files. Here is how i do it:

Here is my ~/.gitconfig:

[user]
	name = Tim Van Wassenhove
	email = git@timvw.be
	
1	
	external = "~/bin/git-diff-wrapper.sh"

Here is my ~/bin/git-diff-wrapper.sh (it uses cygpath to translate the paths):

#!/bin/sh
"/cygdrive/c/Program Files/WinMerge/WinMergeU.EXE" /e /ub /dl other /dr local "`cygpath -aw $1`" "`cygpath -aw $2`" "`cygpath -aw $5`"

And now we’re good to go ;)