- Create ~/bin/git-diff-driver.sh with these contents:
#!/bin/sh
/usr/bin/opendiff "$2" "$5" - Make it executable
chmod ugo+x ~/bin/git-diff-driver.sh
- Make git use this little script for diffs. Edit ~/.gitconfig to include these lines:
[diff]
external = "/Users/ben/bin/git-diff-driver.sh"
Now the next time that you call git diff HEAD FileMerge will open. GUI sweetness.
Thanks for this! Works great - though your line in .gitconf only works for people called ben! ;-)
ReplyDelete