External Diff cannot modify staged files?

I've configured Sourcetree to use the pre-defined entry for "Beyond Compare" in the external diff tool configuration. When I open the external diff on a staged file Beyond Compare opens up just fine. However the two files being compared are both out in my temp folder ie:

AppData\Local\Temp\DGwtKe_my_file.c

If I make any modifications then results end up in this temporary file and not back into my staged file. How can I make SourceTree open my staged file directly so that I can modify the file right in the external diff tool?

For reference, I am running Beyond Compare v3. However, I changed the configuration to use another diff application (WinMerge) and got the same results. Sourcetree is not telling the diff tool to open the staged file - both are out in temp.

Any ideas?

2 answers

The diff tool is only supposed to be used to compare (read) things, not make changes.

The merge tool (might be configured to be the same program as the diff tool) is (only) used to resolve merge conflicts.

For everything else, you need to edit the files outside SourceTree.

Do you know if this is explained anywhere in Sourcetree documentation?

Actually, that is not true. I can modify files using the external diff tool - I just figured it out! I'm not sure what I was doing before when creating this post - but whatever it was it is different than what I am doing now. It now works great just as I had hoped!

Turns out I must have been doing something wrong - SourceTree is now behaving how I expected it to. My external diff opens the *staged* file and therefore allows any modifications made in the diff tool to be preserved.

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...

706 views 3 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