How do you control LFS cost and bandwidth in CI?
IntermediateProductionMonorepos, large files and repository performance
Answer
Skip LFS download unless needed using GIT_LFS_SKIP_SMUDGE=1 or lfs: false in checkout, fetch only needed paths with git lfs pull --include, cache the LFS directory in CI, and clean old LFS objects.
GIT_LFS_SKIP_SMUDGE=1 git clone [email protected]:org/assets.git
git lfs pull --include="textures/hero/*"
More on Monorepos, large files and repository performance
What are the main trade-offs of a monorepo?IntermediateHow do you make CI efficient in a monorepo?AdvancedHow do you onboard developers to a very large repo without a 30-minute clone?IntermediateWhat does Scalar do and when do you recommend it?Advanced`git status` takes 20 seconds in a big working tree. How do you fix it?AdvancedWhen should a team adopt Git LFS and when should it avoid it?Intermediate