Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mamboer/293ef7987cb67a5fd7a8 to your computer and use it in GitHub Desktop.
Save mamboer/293ef7987cb67a5fd7a8 to your computer and use it in GitHub Desktop.
  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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment