David Radcliffe

Configuring DiffMerge for use with git

The default git merge tool was getting annoying so I decided it was time to get a more user-friendly tool. Here are the easy steps:
  1. Download DiffMerge: http://www.sourcegear.com/diffmerge/downloads.html
  2. Install DiffMerge
    I just followed the instructions in the README. Then I renamed diffmerge.sh to diffmerge.
  3. Setup git:
    git config --global diff.tool diffmerge
    git config --global difftool.diffmerge.cmd "diffmerge \"\$LOCAL\" \"\$REMOTE\""
    git config --global merge.tool diffmerge
    git config --global mergetool.diffmerge.cmd "diffmerge --merge --result=\"\$MERGED\"
    \"\$LOCAL\" \"\$BASE\" \"\$REMOTE\""
    git config --global mergetool.diffmerge.trustexitcode false