Wednesday, July 21, 2010

Using WinMerge with GIT

First set the environment as following

git config --replace --global diff.tool winmerge
git config --replace --global difftool.winmerge.cmd "winmerge.cmd \"$LOCAL\" \"$REMOTE\""
git config --replace --global difftool.prompt false

Prepare winmerge.cmd as following as it will be used by git. Make sure its in a path:

cat D:\MyDocs\bin\winmerge.cmd
echo Launching WinMergeU.exe: $1 $2
"C:/Program Files/WinMerge/WinMergeU.exe" -e -ub -dl "Base" -dr "Mine" "$1" "$2"

Use git command as :

git difftool

Thats it! Its all set.