Gitx has a great diff viewer, how do I make git automatically pipe git diff whatever into gitx?
I've tried to set git config diff.external to a shell script that looks like this:
git diff "$2" "$5" | gitx
However, that only opens all the individual files up into multiple gitx windows, and it really messes up the files names (changes them all to tmp files with crazy names).
Does anyone have a better solution?
like sigjuice is saying up there. Only that noobs (like i am now) need to know how to "connect" git to use it. Here is what I did
echo 'opendiff $2 $5' > ~/opendiff-git.sh
chmod a+x ~/opendiff-git.sh
git config --global diff.external ~/opendiff-git.sh
and now all "git diff whatever" should open FileMerge.app ...
I am not quite sure this is what you want but for us on Macs it sure is handy anyway and somewhat related, you might want to try:
$ git difftool -t opendiff #hash
That opens the diff in the opendiff program which I find very useful. This is much easier than creating a shell script and forcing all your diffs through the new external diff. If you are not on a Mac you can probably change the opendiff into your favorite available diff tool...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With