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

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.

All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance