It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

Oleg Detinin Jun 06, 2012

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

24 votes
Answer accepted
Steve Streeting Jun 06, 2012

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.

Oleg Detinin Jun 06, 2012

Thank you very much !

Lin Luo Sep 09, 2014

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

Bronius Motekaitis Feb 26, 2015

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

Alexandre Malo Jun 08, 2015

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!

Like Waldek Gorajek likes this
Daniel Luevano Nov 15, 2016

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

Matt Dolnik Jul 05, 2017
Like Miles Gray Buckton likes this

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

What podcasts are you listening to right now?

Like the title says: what podcasts are in your rotation right now? Here are some favorites I've been in to from the last few weeks. The Ringer NBA Show I've been diving deep into the NBA Playoffs...

1,166 views 21 10
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you