Setting up custom merge tool in SourceTree - Code compare

I'm trying to setup Devart Code compare as the merge tool.

The documentation of Devart Code compare states that it required the following:

/TF="path to remote" /MF="path to local" /BF="path to base" /RF="path to merged"

When I translate this to the argument to be entered in Sourcetree, whtis would be:


However, when I that what is actually being executed, I see that the command line is (I'm trying to merge my Gitignore file):

"c:\Program Files\Devart\Code Compare\CodeMerge.exe" "C:/Program Files (x86)/Git/TF=./.gitignore.REMOTE.1120.gitignore" "C:/Program Files (x86)/Git/MF=./.gitignore.LOCAL.1120.gitignore" "C:/Program Files (x86)/Git/BF=./.gitignore.BASE.1120.gitignore" "C:/Program Files (x86)/Git/RF=.gitignore"

The backslahes seem to have been replaced with the paths to Git. When I try to escape the backslag with another backslash, I get:

"c:\Program Files\Devart\Code Compare\CodeMerge.exe" "//TF=./.gitignore.REMOTE.1120.gitignore" //MF=./.gitignore.LOCAL.1120.gitignore //BF=./.gitignore.BASE.1120.gitignore //RF=.gitignore"

which doesn't work either.

Is there anything I can do to correct the argument that needs to be passed as forward slash?

3 answers

Hi Robert

This setting will work:

Diff command: C:\Program Files\Devart\Code Compare\Codemerge.exe

Arguments: -MF=\"$LOCAL\" -TF=\"$REMOTE\" -BF=\"$BASE\" -RF=\"$MERGED\"

Try using the other type of slash to escape:


Hi Seth, thanks for your response. I tried that already too, but no luck so far.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,231 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you