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

Sourcetree: View file content from selected commit

Oleg Detinin June 6, 2012

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 ?

Thanks,

Oleg

2 answers

1 accepted

0 votes
Answer accepted
stevestreeting
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2012

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.
Oleg Detinin June 6, 2012

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

Oleg

Like Kali Mike likes this
farmerpaul September 20, 2012

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!

1 vote
Nacho Caballero June 16, 2017

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

Chris Lanning October 24, 2017

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!

Dave Hollingshead August 9, 2018

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
TAGS
AUG Leaders

Atlassian Community Events