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

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!

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!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Jodi LeBlanc
Posted Thursday in Off-topic

Friday Fun: How do you recharge your batteries after a busy week?

Happy Friday – Fun Day! I don’t know about you, but I have been giving everything I’ve got this week (and most weeks) and come Friday I look for unique ways to recharge my batteries - rest, relax, a...

222 views 21 4
Join discussion

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