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

How do I review an old LFS file on Sourcetree

Link Lee August 21, 2017

Hi guys,

I know that I can view all the history of my LFS file commits on Bitbucket. I can also download the files themselves. Technically, I should be able to do the same thing at local with Sourcetree, as I have the pointers to all the history files. 

It'd great if I could do both:

1. having a quick look of any old LFS file (when they are jpg, png, etc.)

2. downloading an old LFS file at a selected commit

Nevertheless, if this is not supported by Sourcetree. It would also be much appreciated if I could be instructed of how to do it with command line : )

Thanks!

1 answer

0 votes
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2017

Hello! This is not currently supported by Sourcetree, but you can use the following command to get your desired result:

git cat-file --filters "{COMMIT-SHA}:{FILE NAME}"

 

You'll need to pipe that output to a file, and once you do that you'll be able to view it.

Link Lee August 23, 2017

Hi Mike,

I'm sorry, but I'm still very new to Git and therefore confused by your answer.

First of all, I'd like to download a single file from an old commit. So I was assuming two parameters, one file name for input and the other for output, are required for the command.

Secondly, all my LFS files are binary ones. So is there any pre-configuration to be done to let my PC know I'm exporting, say, a JPG file?

It'd be very nice of you if you could provide a more precise example.
Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events