Problem: checkouts are too big or too slow
Symptoms:
- Developers or CI machines deal with huge working directories (and don’t need all the content)
- When switching branches, Git appears to hang for a while
git-sizer
indicates large checkout sizes
Tell Git you’ve got a big monorepo
- Turn on
feature.manyFiles
.
Work with less data
- Consider sparse checkouts.
- Consider composing the monorepo from sub-repos using
git submodule
.
Optimize your hardware and software
- Turn off virus scanning for your working directory.
- Upgrade developer workstations to fast SSDs.
- Once you’ve upgraded to SSDs, set
checkout.workers
to-1
in order to have Git choose the optimal number of parallel workers for your system.