External Diff cannot modify staged files?

Daniel Nelson January 19, 2015

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

0 votes
Daniel Nelson January 21, 2015

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.

0 votes
Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 19, 2015

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.

Daniel Nelson January 20, 2015

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

Balázs Szakmáry
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2015

No.

Daniel Nelson January 21, 2015

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events