Przejdลบ do treล›ci

๐Ÿ—‚๏ธ 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

1
git lfs install

๐Ÿ”ง Track File Types

1
2
git lfs track "*.png"
git lfs track "*.zip"

This creates or updates .gitattributes.


๐Ÿ”ง Push LFS Files

1
2
3
4
git add .gitattributes
git add file.png
git commit -m "Add LFS file"
git push

๐Ÿ”ง List LFS Objects

1
git lfs ls-files

โš ๏ธ Notes

  • LFS requires server support (GitHub, GitLab, Bitbucket)
  • LFS files count toward storage quotas