How do I pipe in FileMerge as a diff tool with git on OS X?

doug picture doug · Mar 18, 2010 · Viewed 19.8k times · Source

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

I want to be able to send diffs to FileMerge.

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?

Answer

Erin Dees picture Erin Dees · Mar 18, 2010

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.