Sublime Forum

[Query] Diff between commits/branches/tags on Unix-like systems?

#1

Hi,

How can I do diff between commits, branches and tags? :confused:

Thanks

1 Like

#2

You can select two commits in the commit tree by clicking on the first commit and then Ctrl or Command clicking on the second commit. The view on the right will switch to a diff between those two commits.

You should see an item in the header that tells you the commit hash that it’s Diffing From.

1 Like

#3

Aha, this is how to Diff between commits. Thanks :blush:
What about branches and tags? :confused:

0 Likes

#4

The same will work for those, but you need to look through the list to find the commits that are tagged or represent the branch heads first. I believe it’s been mentioned that the devs are thinking of some ways to navigate the list a little easier, though.

0 Likes

#5

I selected a Commit and I kept pressing on Ctrl/Command then press on desired tag/branch!
I thought this would work. :disappointed_relieved: Isn’t this a good workflow for the situation? :neutral_face:

0 Likes

#6

Why keep pressing ctrl? Just select one commit, scroll down to the one with the branch to compare against and press ctrl while clicking on it. … Done. Works the same way as selecting two files in the Windows File Explorer. Not sure if macOs is capable of doing so as well, though! :wink:

0 Likes

#7

So, I guess it is different for unix like systems. :open_mouth:
Because, I already tested it on Mac & OpenSUSE. :smile:

0 Likes