Sunday, July 20, 2014

Using Winmerge as a diff tool in GIT


Step 1:
Install Winmerge.

Step 2:
Create a file named ‘winmerge.sh’ under your repository.

Step 3:
Write this into ‘winmerger.sh’ file.
#!/bin/sh
echo Launching WinMergeU.exe: $1 $2
"PathToWinMerge" -e -ub -dl "Base" -dr "Mine" "$1" "$2"
Path To Winmerge: Ex:  C:/Program Files/WinMerge/WinMergeU.exe

Step 4:
Update your .gitconfig file (will be under your user folder C:\Documents and Settings\YourName)
[diff]
            tool = winmerge
[difftool]
            prompt = false
[difftool "winmerge"]
            cmd = winmerge.sh $LOCAL $REMOTE

Step 5:
Using winmerge:
git difftool ReleativeFilePath/FileName

No comments:

Post a Comment