Sourcetree: How can I compare (diff) files from arbitrary commits ?

Repo is git.

Can not find this option. I see the option to compare file with its parent, but how can I compare any given file with a file from a selected commit ?

1 answer

1 accepted

Just select 2 commits in the log at once using Cmd-Click, then you'll see the complete diff between those two commits.

If you want to filter things down further you can right-click on a file, click 'Log Selected' to get the history just for that file, and then again multi-select commits in that window.

Thank you very much !

Follow-up question: how to use ExternalDiff to view the diff as provided in the above approach?

@Lin Luo I can still see External Diff on one file at a time in the arbitrary diffs view. Click on one file within the composite diff, and cmd-click > External Diff as always.

Follow-up question: Selecting two commit in the log at once work correct, but it occurs often that the selected commit are lost while viewing the diff (it returns to the uncommited changes). Would there be a way to open a new windows with the diff of the selected two commits? Thanks!

How can I do this on windows? I want to see the differences between two commits on all files involved.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Monday in Agility Beta

We've moved!

A note to all watchers that we've moved to a new community home... https://community.atlassian.com/t5/Agility/ct-p/agility Please update your notification subscriptions to keep across the ...

47 views 0 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