Alex Rivera | Logout

How do I view 'git diff' output with my preferred diff tool/ viewer?

Asked 2008-10-31T22:55:12.493
842

When I type git diff, I want to view the output with my visual diff tool of choice (SourceGear "diffmerge" on Windows). How do I configure git to do this?

Edit
Report

2 Answers

10

If you're doing this through Cygwin, you may need to use cygpath:

$ git config difftool.bc3.cmd "git-diff-bcomp-wrapper.sh \$LOCAL \$REMOTE"
$ cat git-diff-bcomp-wrapper.sh
#!/bin/sh
"c:/Program Files (x86)/Beyond Compare 3/BComp.exe" `cygpath -w $1` `cygpath -w $2`
answered 2010-03-30T17:42:42.490
6

If you're on a Mac and have Xcode, then you have FileMerge installed. The terminal command is opendiff, so you can just do:

git difftool -t opendiff
answered 2011-09-04T09:03:16.483

Your Answer