Skip to content

Instantly share code, notes, and snippets.

@VivienLN
Last active January 10, 2019 17:07
Show Gist options
  • Save VivienLN/4361f45b0a1961cc9d86 to your computer and use it in GitHub Desktop.
Save VivienLN/4361f45b0a1961cc9d86 to your computer and use it in GitHub Desktop.
Using windiff as diff tool in git

1/ copy windiff.exe to C:/WinDiff.exe

2/ create wrapper file C:/windiff/windiff.sh :

#!/bin/sh
"C:/WinDiff.exe" "$1" "$2"

3/ add windiff directory to path via cmd (in admin mode) :

setx path "%path%;C:\windiff"

5/ add to .gitconfig (in C:/user/xxx/.gitconfig):

[diff] 
tool = windiff 
[difftool "windiff"] 
cmd = windiff.sh \"$LOCAL\" \"$REMOTE\" 
[difftool] 
prompt = false

4/ use it with:

git difftool

OR

git difftool FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment