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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,237 views 26 12
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