Can you diff a working copy file versus another version that is not the previous version?

Don Robbins September 25, 2014

With sourcetree it seems that you can only diff a working copy of a file versus its previous version. Is there a way to diff the working copy to any version of the same file without having to commit the file?

1 answer

0 votes
Seth
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.
September 25, 2014

If I use "External Diff" by right-clicking a file in any commit, it pulls up a 3-way merge window with my working copy, a copy from the commit prior to the selected commit, and a copy from the selected commit.

I'm using SourceTree on Windows. My diff tool is meld with the paramaters "$BASE $REMOTE $LOCAL".

Don Robbins September 25, 2014

In this case I am talking about files that have not been committed yet. These are files that have been modified and might be staged or unstaged. I would like to diff that file versus any other version like you can when you run log selected without having to commit the file first. 

Seth
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.
September 25, 2014

Yes, that is what I mean by "working copy" as well. It's whatever file is in my folder structure in whatever state it is in. For a custom diff command, it appears that $BASE corresponds to the working copy of a file. $BASE may not be used for the pre-configured diff tools, I'm not sure.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events