tags:

views:

2007

answers:

3

I have my editor setup to be textmate but when I do a git diff it uses vi to show me the diff output, is there any way to set it to show the diff in textmate?

+5  A: 

The GIT_PAGER environment variable is used to specify which program to use to show multi-page output. You should be able to set this to point to textmate.

Greg Hewgill
Thanks, I was looking for this. Here's the git config equivalent: git config --global core.pager "/usr/bin/mate"
cobra libre
+9  A: 

I normally pipe the contents to mate like this:

git diff | mate -
Bill Turner
Also, just as an interesting point: you don't need to specify the `-` when piping to `mate` because `mate` reads from stdin when run with no parameters.
thenduks
+3  A: 

If you have the Terminal link installed it's simple:

git diff | mate

I personally have an alias setup that maps 'diffmate' to that command.

DarthNerdus