The following commands in a
Command Prompt window will update
.gitconfig to configure GIT use DiffMerge:
C:\> git config --global diff.tool diffmerge C:\> git config --global difftool.diffmerge.cmd "C:/Program\ Files/SourceGear/Common/DiffMerge/sgdm.exe \"$LOCAL\" \"$REMOTE\"" C:\> git config --global merge.tool diffmerge C:\> git config --global mergetool.diffmerge.trustExitCode true C:\> git config --global mergetool.diffmerge.cmd "C:/Program\ Files/SourceGear/Common/DiffMerge/sgdm.exe -merge -result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\""
This will also work for the Gitcmd that is offered on the Git website, but not the Git Bash shell.
Note that both of the
....diffmerge.cmd ... lines
were wrapped for this document.
You can verify your settings with the
git config --list command.
The commands above assume that the MSI installer was used to
install DiffMerge in the standard location.
If you installed DiffMerge from the ZIP package, be sure to
adjust the pathname to