views:

340

answers:

1

I'm new to git, on OSX, using it via command line. I come from the world of Tortoise SVN and Beyond Compare on Windows.

I want to be able to pipe in diffs to happen via FileMerge which I have installed already.

I was able to do this with TextMate simply by using:

git diff | mate

But I'm not sure how to get that set up so I can use FileMerge instead?

+4  A: 

Although it's not exactly the same as piping stdin into a script, you can do this:

git difftool -t opendiff -y

That will launch FileMerge once for each file. Doing the whole project tree at once takes a little scripting.

See also this question.

undees
thanks!!!!!!!!!!!!!!so "difftool" basically is like a regular "diff" command but giving the choice for an external diff tool? and "opendiff" calls FileMerge specifically?and i can still pass a path to a specific file to diff just one?sorry, at home now and unable to test on my work machine ;)
Doug
actually, that isn't doing anything for me i see. my command line just returns a prompt. i tried having filemerge fired up, nothing.
doug
Hi, Doug.It might be having trouble finding the "opendiff" binary on your path. What happens when you create a couple of text files, and then type "opendiff file1.txt file2.txt" in Terminal?
undees