Code Compare Integration with Sourcetree

When using Sourcetree to simplify your interaction with Git and Mercurial repositories, Code Compare can become an easy and convenient tool for comparing and merging conflicts.

To use Code Compare with Sourcetree, you need to add the following lines to the gitconfig file:

[difftool "codecompare"]
cmd = \"C:\\Program Files\\Devart\\Code Compare\\CodeCompare.exe\" -W \"$LOCAL\" \"$REMOTE\"
renames = true

tool = codecompare
guitool = codecompare
[mergetool "codecompare"]
cmd = \"C:\\Program Files\\Devart\\Code Compare\\CodeMerge.exe\" -MF \"$LOCAL\" -TF \"$REMOTE\" -BF \"$BASE\" -RF \"$MERGED\"
trustExitCode = true
keepBackup = false
tool = codecompare
guitool = codecompare

Note: The global gitconfig file is located in C:\Users\MyLogin\.gitconfig. The config file for a local repository is located in repository root in the ".git" folder (this folder is hidden by default).

And check whether SystemDefault is set in Sourcetree as shown on the screenshot below:

Souretree Integration