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

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

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

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. 

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
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,118 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