How do I review an old LFS file on Sourcetree

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 : )


1 answer

0 vote
Mike Corsaro Atlassian Team Aug 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.

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.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

706 views 0 4
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot