I love the SourceTree diff UI but I need to diff the common ancestor of two branches. In git, the command for this is:
git diff master...feature
Where 'feature' is some feature branch head. Note the triple-dot notation. This means that you want not the difference between the heads of "master" and "feature" but the difference between the common ancestor of "master" and "feature" and the head of "feature".
Is there a way to do this?
In SourceTree you can diff any 2 points in history just by Cmd-clicking to select two commit lines in the log view - the differences between those 2 commits, wherever they are, is then displayed. So that includes diffing the common ancestor and the head of the feature branch. However, right now you have to find this common anscestor in the log yourself, there's no automated selection of it.
Steve, thanks a lot for all the help. Sorry, there's one last thing I've never understood. When you click on a single commit, obviously it's showing the diff between that commit and its parent. But when the commit is a merge commit, there are two parents. So what does it display then? (I suppose this is more of a fundamental git question than SourceTree...)
Welcome to your weekly Jira Ops Early access program update, where we’re sharing news and updates on Jira Ops' progress as we work toward our 1.0 release. If you ever want to drop us feedback or idea...
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!
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