How To Install and Use Git LFS to Version Control Large File Projects Files
Вставка
- Опубліковано 1 жов 2024
- If you haven’t subscribed yet, don’t forget to subscribe.
In this video we are going to learn how to install and use Git LFS for versioning our projects. It is common to version control text based files like source code for your projects where the typical file size is in around kb to a few mb.
Git lfs allows for tracking large files in a project, from projects like graphic design, 3d modeling,, video editing and game industry like Unreal Engine and Unity where the files size tends to be big. Use git LFS to version control them..
How is git different from git LFS?
Git is a distributed version system, every clone has a full history.
How git works is it takes a snapshot of your current files, if on the next commit only few files has changed it takes a snapshot of those files and for the unchanged ones it still uses the reference from the previous commit using pointers. These snapshots build over time. Storing pointers to them is more efficient.
Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
So this is an add-on to git and not part of git itself. We would need to install it separately from git.
Git Large File Storage
git-lfs.com
homebrew command:
brew install git-lfs
Commands
Add lfs to your local repo
git lfs install
Track the file or wild card
git lfs track "*.psd"
Or modify the .gitattributes file after adding your first file to track
Buy Me Coffee
buymeacoffee.c...
Social
Twitter/X: / olopsman
Shot with Sony ZV-E10
amzn.to/3uVzPQt
Sigma 16mm f/1.4 DC DN
amzn.to/3AgH1d1
Rode MicroVideo Microphone
amzn.to/3ccVRYR
SanDisk 128GB Extreme PRO
amzn.to/3RF9gZD
My Workstation Setup
Macbook Pro 16 inch M1 Pro
amzn.to/3OdBqb7
Samsung 28-Inch 4K UHD Led-Lit Monitor
amzn.to/3Od1t27
USB C to HDMI Cable 4K
amzn.to/3REVpBe
Apple Magic Keyboard with Touch ID and Numeric Keypad
amzn.to/3Pwm6HF
Skillshare Referral
share.skillsha...
they could just automate this, it's 2024 already lol
TY THIS MAKES NO SENSE
go ahead and fork the project
I have to upload a three js project which has video,assets and images around 1.5 gb i am not able to do it please tell me how to deploy it.
Track the large files with git lfs track "filename" and do the normal git commits. What happens when you try?
@@JustAnotherDangHowToChannel Thank you so much for the tutorial, I finally pushed it up
Thank you so much, it worked ❤
So, you mention that video editing is one use for this, and im looking to stup a streamline workflow with Azure LFS to not only backup the source footage but also bring in any assets I may need for a project. I've been setting up branches per project. But the problem is, the lfs folder starts to accumulate over time and become very large despite the source footage not getting modified in history. What do I need to do to prevent the .git folder from taking up my entire hard drive? Stays large even when I pull a single branch at depth 1.
Thank you so much for the information 😊
Finally found the right video and uploaded my ml files to github.
Thanks a lot for the video ❤
thank you so much, it was so easy to understand❤
I uploaded my files(they about 55mb) but when i download them in github they are 1 kb
it looks like you're downloading the pointer file rather than the LFS object itself.
In order to download the object for zip downloads, you'll need to enable LFS objects in archives.
From the command line, you can retrieve all LFS objects with git lfs fetch --all.
@@tzgames thanks
legend
thanks