atlassian-sourcetreedevartcodecompare

Set Devart's Code Compare as custom diff & merge tool in Sourcetree?


How to add Devart's Code Compare as custom diff & merge tool within Sourcetree?


Solution

  • I modified my C:\Users\[User Name]\.gitconfig file by adding this like 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 running correctly inside Visual Studio which is awesome.

    Hope it helps!

    Code compare integration with source control systems