A monorepo has 4 GB of history and developers only touch one service. How do you make their day-to-day faster?
IntermediateScenarioScale, Submodules, LFS and GitHub Automation
Answer
Situation read → Most developers do not need all files or all blobs locally.
What I'd do →
- Partial clone:
git clone --filter=blob:none --sparse URL. - Limit the working tree:
git sparse-checkout set services/billing libs/common. - Enable
core.fsmonitorandfeature.manyFilesfor faster status. - Run
git maintenance startfor background prefetch and commit-graph updates.
Why → Blobs download on demand, and only needed paths are checked out.
Interview tip → Know the difference: shallow limits history depth, partial clone limits object types.
More on Scale, Submodules, LFS and GitHub Automation
Designers commit PSD and video assets, and the repo keeps growing. How do you move them to Git LFS?IntermediateYour GitHub LFS bandwidth quota is exhausted and CI pulls fail. What do you do?AdvancedA repository uses a submodule. How does a developer get the right version of it?BeginnerSubmodules, subtree or a package manager for sharing code between repos?IntermediateCI cannot clone a private submodule: authentication fails in `actions/checkout`.IntermediateYou must remove a submodule completely.Beginner