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

`git status` takes 20 seconds in a big working tree. How do you fix it?

AdvancedProductionMonorepos, large files and repository performance
Answer

Enable the filesystem monitor and untracked cache so Git stops walking every file, enable split index and commit-graph, check for huge untracked directories that need ignoring, and confirm antivirus is excluding .git.

git config core.fsmonitor true
git config core.untrackedCache true
git config feature.manyFiles true
GIT_TRACE_PERFORMANCE=1 git status
All Git & GitHub questions Roadmap: Git & GitHub

More on Monorepos, large files and repository performance