GitHub for Windows or Git Bash Shell

The following is based upon the 1.0 release of GitHub for Windows or Git Bash Shell.

Since GitHub for Windows is built upon a version of the Git for Windows (MSysGit) package, the Command Prompt commands in the following section could also be used. The acutal configuration file settings are provided here to avoid various command line quoting issues in the various shells available to you.

Add the following lines to your .gitconfig. This file should be in your home directory in C:\Users:

    tool = diffmerge
[difftool "diffmerge"]
    cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe
        \"$LOCAL\" \"$REMOTE\"

    tool = diffmerge
[mergetool "diffmerge"]
    trustExitCode = true
    cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe
        -merge -result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"

Note that both of the cmd = ... lines were wrapped for this document and should appear as a single line in your .gitconfig file. You can verify your settings with the git config --list command.

The pathnames 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 sgdm.exe accordingly.