Install Devart Code Compare as a custom tool for comparing and merging in Sourcetree?

How to add Devart Code Compare as a custom tool for markup and merge in Sourcetree?

+7
atlassian-sourcetree devart codecompare
source share
5 answers

I changed my file C:\Users\[User Name]\.gitconfig , adding this as Alex suggested:

 [difftool "codecompare"] cmd = 'C:\\Program Files\\Devart\\Code Compare\\codecompare.exe' -W \"$LOCAL\" \"$REMOTE\" renames = true [diff] 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 [mergetool] keepBackup = false [merge] tool = codecompare guitool = codecompare 

Then I changed my SourceTree Tools -> Options -> Diff to "System Default".

After that, my Code Compare started working correctly inside Visual Studio, which is amazing.

Hope this helps!

Integrating Code Comparison with Version Control Systems

+13
source share

In SourceTree, go to Tools> Options> Tab: Diff.

In the External Diff / Merge panel, enter the following data:

External Diff Tool: Custom
Diff Command: C:/Program Files/Devart/Code Compare/CodeCompare.exe
Arguments: $LOCAL $REMOTE

Merge Tool: Custom
Merge Command: C:/Program Files/Devart/Code Compare/CodeMerge.exe
Arguments: -MF "$LOCAL" -TF "$REMOTE" -BF "$BASE" -RF "$MERGED"

teste

+4
source share

To integrate Code Compare with Sourcetree, add the following lines to the c:\Users\[User Name]\.gitconfig :

 [difftool "codecompare"] cmd = 'C:\\Program Files\\Devart\\Code Compare\\codecompare.exe' -W \"$LOCAL\" \"$REMOTE\" renames = true [diff] 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 [mergetool] keepBackup = false [merge] tool = codecompare guitool = codecompare 

Now git diffftool will work correctly from both the command line and Sourcetree.

Note. In the Sourcetree options you need to select the option "System default value".

Git Integration

+1
source share

What worked for me: Win10, SourceTree 2.1.110, Code Compare 4.2.236

  • SourceTree> Tools> Options> External Diff
  • Diff: Tool-> Custom;
    • Command: c:\Program Files\Devart\Code Compare\CodeCompare.exe
    • Arg: $LOCAL $REMOTE
  • Merge: Tool-> Custom
    • Command: c:\Program Files\Devart\Code Compare\CodeMerge.exe
    • Arg: -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"

Keep in mind that tripartite mergers are only available in Code-Compare PRO.
https://www.devart.com/codecompare/featurematrix.html

0
source share

Check Devart Code Compare the help file for the "Integration of Version Control System" section. There is a theme for GIT.

-one
source share

All Articles