Interview Prep/Git & GitHub/Monorepos, large files and repository performance

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/*"
All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance