Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Equivalent of a git show on a specific commit

Seth Willits January 30, 2018

Briefly: What's the SourceTree equivalent of:

git show 946a759:File.h


More thorougly:

  1. File.h did not change in commit 946a759, I just want to see the contents of the file as it was at the time of that commit.

  2. I do know that I could change the Log View - Working Copy view to show all of my files, find the file in the list, right-click on it and choose "Log Selected", find the commit (or the next oldest one) but

    • That's a cumbersome process
    • I don't want to change the Log View's setup to show all files
    • It's really difficult to find a random file in that huge long list of files.

So what I'd like to do is be in the Log View with my master branch selected in the left sidebar, find the particular commit in the tree, and then do the equivalent of git show rev:AnyFileIWant. I'd be just fine typing in the path to the file.

I can't seem to find a way to do this?

1 answer

1 accepted

0 votes
Answer accepted
Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

I don't think we have something similar available on sourcetree. However, you can select the given file in a commit and from the contextual menu click on "Log Selected" to see all the various modifications of that given file. Thought this doesn't exactly do the same as what you need, if you have an idea of the date of modification, you can figure out which version to look at. 

Seth Willits January 31, 2018

That's what I figured. It'd be a useful feature to have, to be able to browse the tree and view contents at any revision.

Manju
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2018

Feel free to submit a feature request on https://jira.atlassian.com/projects/SRCTREE/ and vote on it for inclusion in an upcoming release. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events