๐๏ธ Git LFS (Large File Storage)
Git LFS stores large files (images, videos, binaries) outside the main repository to keep it fast and lightweight.
๐ Who This Is For
- Beginners learning large-file workflows
- Intermediate users working with media or binaries
- Advanced engineers needing structured reference
- DevOps teams maintaining scalable repositories
๐งฉ Why LFS?
- Git is not optimized for large binary files
- LFS stores pointers instead of full files
- Keeps clones and fetches fast
๐ง Install LFS
๐ง Track File Types
| git lfs track "*.png"
git lfs track "*.zip"
|
This creates or updates .gitattributes.
๐ง Push LFS Files
| git add .gitattributes
git add file.png
git commit -m "Add LFS file"
git push
|
๐ง List LFS Objects
โ ๏ธ Notes
- LFS requires server support (GitHub, GitLab, Bitbucket)
- LFS files count toward storage quotas