Sourcetree: View file content from selected commit

Repo is git.

I'm completely lost. This should be straight forward, but I am not able to find it. How can I view a file content from selected commit ?

1. If I choose Open(Shift+Command+O) its open a cheked out file, not a file from the selected commit

2. If I choose "Quick View" -- it does a trick, but I can not select text from QuickView window, plus QuickView dows not open text files with my custom extension. So this is not an option.

3. I can see a file content in a Blame view, but again, I can not select any text from there. Plus the purpose of this view is different.

Is it a way to see a file content in the same part of the window where the diff information is currently displayed ?



2 answers

1 accepted

This widget could not be displayed.

You can do this two ways:

  1. Quick Look - even though you can't select the contents of the Quick Look panel, you can click the 'Open With <App>' button at the top-right to get the fully editable version
  2. If that isn't possible, you can use the 'External Diff' option in the diff window which will always give you the full contents on both sides of the diff in the tool you've chosen.

Thanks, Steve.

Is it possible to improve this functionality ? There are many ways to make it better. Like:

- Adding another button netxt to diff, to open selected file in external app

- Having an option to open it in place instead of diff output

- Some keyboard shortcut

- something else


I agree; I was getting frustrated that there was no convenient way to copy & paste from the Quick Look window (though I guess I'm more frustrated with Apple because of that :P). Thank you Steve for the tips, that works great!

This widget could not be displayed.

For anyone looking for a better answer: right click on the file name | log Selected | right click on the commit | Open selected version

I was looking for something like 'View Log'.  Log Selected sounds like it is going to perform an action.  Thank you for this, it is just what I was looking for!

I have a problem with this; the file will only ever open in Chrome. It's a .html file, and I'd prefer my Mac's default be Chrome, but I need to open this version of the file in a text editor without having to checkout the file.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Sep 17, 2018 in Teamwork

The tools we make for teams? We use them every day at Atlassian to get shit done (and it works).

I’m Jess, a Product Marketer for Jira Software Server and Data Center, and now a huge fan of our products. Read on for a 90 day, new-hire perspective on what it’s like to standardize on the Atlassian...

133 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you