Problem: local Git commands (like add or status) are slow
Symptoms:
- Running
git addorgit statusmakes Git appear to hang
Tell Git you’ve got a big monorepo
- Turn on
feature.manyFiles.
Use new Git features
- Turn on the split index using
core.splitIndex. This can help reduce the size of index writes in some cases, but index reads can still be slow. - Make sure FSmonitor is enabled. On Windows, use the native FSmonitor; on macOS and Linux, use Watchman.
- Use
sparse-checkoutwith sparse index usinggit sparse-checkout init --cone --sparse-index. Currently incompatible with the split index feature.