Question: 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: 
Create an executable script `git-diff-cmd.sh`

```
#!/bin/bash

xattr -w com.apple.TextEncoding "UTF-8;134217984" "$2"
xattr -w com.apple.TextEncoding "UTF-8;134217984" "$5"

/usr/bin/opendiff "$2" "$5" -merge "$1"

```

Now edit your `.gitconfig` file to include the lines

```
[diff]
    external = <path-to>/git-diff-cmd.sh

```

...replacing `<path-to>` by the path to `git-diff-cmd.sh`.
Now `git diff` will use FileMerge, and correctly display UTF-8 Unicode characters.
First, start by telling git you want to use FileMerge (aka opendiff) as your default difftool:

```
git config --global diff.tool 

```

(This only needs to be done once)

Then it's as simple as

```bash
git difftool

```