mickdelaney
3/18/2014 - 5:32 PM

Setting up SourceGear DiffMerge for Git.md

  1. Download SourceGear DiffMerge: http://sourcegear.com/diffmerge/index.html

  2. Add the following to your global .gitconfig file:

     [diff]
         tool = DiffMerge
     [difftool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' "$LOCAL" "$REMOTE"
     [merge]
         tool = DiffMerge
     [mergetool "DiffMerge"]
         cmd = 'C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe' -merge -result="$PWD/$MERGED" "$PWD/$LOCAL" "$PWD/$BASE" "$PWD/$REMOTE"
         trustExitCode = true
     [mergetool]
         keepBackup = false
    

After following these steps, you can run git difftool and git mergetool to open SourceGear DiffMerge from the Git Bash prompt.