Sublime Forum

Sublime Merge, [SOLVED] show diff for arbitrary commits in certain view

#1

We have been started using sublime merge and wonder whether there is a feature to see the difference between 2 arbitrary commits when listing all commits for a given file.

0 Likes

#2

You can select two commits in the commit list, and you’ll get a diff between those too commits. This works both in regular navigation, and in search results (i.e., file history)

1 Like

#3

Will this even be possible in a the view listing all commits for given file? We didn’t manage to figure out how. In the end it is the graphical representation of
git diff 3738282994728…382929393 filename.ext

0 Likes

#4

Ok, I’ve seen that this is possible in file history view, how do I switch between default diff view to “side-by-side”?

0 Likes

#5

Yes, you can use File History to see just a single file (which just does a “file:foo.txt” search for you, FWIW).

Related to that, it’s also common to just want all commits that touch a single function in a file. You can do this by opening the file in Sublime Text, selecting the function, and then choose “Line History” from the context menu.

Inline vs side-by-side diffs are by default controlled by the window size: if you make the window wide enough to fit a side-by-side diff, you’ll get a side-by-side diff. You can control this behavior from the Preferences dialog, and force it to always show a side-by-side diff.

0 Likes

#6

Thanks a lot for the detailed description. It is a joy to have people like you supporting others. Sublime merge rocks.

0 Likes

#7

So don’t miss to buy a license :wink: :slight_smile:

0 Likes

#8

Unfortunately I have to argue with my employer first. But this feature could be used as a beach head. :slight_smile: Greeting from a German in Sweden. :slight_smile:

1 Like

#9

With the release 2.0 I finally bought a license. :slight_smile:

3 Likes