When is a shallow, single-branch clone enough in production tooling?
BeginnerProductionMonorepos, large files and repository performance
Answer
For deploy and build jobs that only need the exact commit: git clone --depth 1 --single-branch --branch <tag>. This minimises time and data and removes the temptation to rely on history.
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