Sublime Forum

Opening file version at commit


Is there a way to see the file as it was at a certain commit? I’m able to do this with SourceTree and it’s a quite useful feature.

1 Like


While you’re looking at a commit, you can click on the tree hash or click on the three dots menu and choose View Tree to see the tree for that commit. Picking a file from the tree list shows you the blame view for the file at that commit. Once you have that open, you can click around in the commit graph to change the selected commit, and the view will show you the contents of the file at that commit.

Is that what you’re looking for?



@OdatNurd But there is no “direct” way to jump to a file at Revision XYZ, correct? I missed this too a while ago while digging through commits for a file relatively deep in a directory structure. Thanks for any hint regarding this.



Not that I am aware of. Related enhancement request:

1 Like


Indeed as far as I’m aware there’s no direct way to do that.

There are a variety of ways to get there; the file: term in the search view, using File History or Blame from the command palette, smerge search blah from the command line. They all require some extra interaction to hit what you want, though.

1 Like


@srbs Thanks for the link!

@OdatNurd Thanks for your response! Yes, I manage it in one of the ways you suggested but it feels unhandy somehow (although I have no ‘perfect’ solution suggestion for this workflow yet) .

1 Like


Thank you for your replies, I believe this was added in the latest build and that solves my issue



To help anyone searching in the future, what are the steps you found that work to solve your issue?



In the new build on Windows (Build 1107), in the sidebar at the bottom of the page, you can select ‘Changes’ or ‘Tree’. If you click on ‘Tree’, you’d see the status of all the files at the time of the selected commit. Clicking on any file in the Tree shown opens a blame on the file at the time of the commit. Here’s how it looks like:



The new features allows me to view all files the way they were at a particular commit but I’m a bit limited with what I can do with a file opened in SM. If I right-click on the file and click on ‘Open in Editor…’, it opens the current version of the file. Is there a way to open the file version at that commit?