11/3/10

Git Custom Difftool Configuration

Original solution by David Tchepak: Setting up Git difftool on Windows

This example shows the configuration for ExamDiff Pro.
Tested on Windows 7 and msysgit version 1.7.3.1

1. Set the path environment variable to include "c:\program files\git\cmd\;"
2. Create a shell script wrapper file, note the forward slashes in the executable path
#c:\program files\git\cmd\diff.sh
#!/bin/sh
"c:/program files/examdiff pro/examdiff.exe" "$1" "$2" | cat

3. Edit the .gitconfig file
#c:\users\john\.gitconfig
[diff]
tool = examdiff

[difftool "examdiff"]
cmd = diff.sh "$LOCAL" "$REMOTE"
...

4. Verify it works, run the difftool command: git difftool --no-prompt


No comments:

Post a Comment