How can I do a diff in the opposite direction in SourceTree? In other words, how do I get SourceTree to do diff b a instead of diff a b?
e.g., if my commits are in this order in my commits pane:
3333 2222 1111
and I select 3333 and 1111, it will show me a diff of changes from 1111 to 3333 (i.e, diff 1111 3333).
How do I make it do a diff in the other direction, so that it's a diff of changes from 3333 to 1111 (i.e., diff 3333 1111)?
Here is a screenshot showing where I selected 2 commits in SourceTree and the corresponding diff:
Not a the moment I'm afraid, the diff between commits is always shown in 'forward history' order.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This would be an incredibly useful feature - I submitted a JIRA feature request for this here https://jira.atlassian.com/browse/SRCTREE-2176
As a workaround, for now I use the commandline solution
git checkout branch1
git merge --no-commit branch1
and preview the potential merge changes in SourceTree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's not possible, per @Steve_Streeting's answer, but here are some alternatives:
1. Use a different external GUI diff viewer
2. Copy the files from older commit 1111 into the working tree for newer commit 3333, and then see the diffs in the working tree, e.g.,
cd {repo} git diff --name-only 3333..1111 > /tmp/list_of_files_changed git checkout 1111 mkdir /tmp/files_changed cp --parents -pr $(cat /tmp/list_of_files_changed) /tmp/files_changed git checkout 3333 cp -pr /tmp/files_changed/* . # (now look at the diff in SourceTree for the working copy)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.