The default merging behavior of git is pretty good - until it blows chunks and litters your merged file with dozens of >>>> markers. I had this happen to me again this weekend, and was finally motivated to do something about it.

To change the default merging behavior in git, you run

git config --global merge.tool toolname

To see the list of available tools, type

git mergetool

Most of the tools that git understands are unix-y. There is one OS X tool on the list: opendiff, which launches the FileMerge tool. But honestly, I've never been that impressed with FileMerge's merge algorithm.

Fortunately, xxdiff is a pretty good tool, and it's available as a Darwin port. So, assuming you already have your OS X box set up to install ports, you can have this as your default git merge user interface by running:

sudo port install xxdiff
git config --global merge.tool xxdiff

Now files needing a merge will open in the xxdiff user interface - which is an ugly XWindows thing, but it's powerful. I'd love to see git hook up to something like Araxis Merge or Changes (when their 2.0 version with 3-way merge comes out), but I'm not nearly motivated enough to hack around in the git source yet.