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!
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.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.