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

This widget could not be displayed.
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
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,269 views 8 11
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