- Enable
git config feature.manyFiles true
to opt in to a few settings to help speed up large repos. At time of writing it setsindex.version=4
andcore.untrackedCache=true
- Run
git gc
to garbage collect unreachable objects, clean up reflog. Under the hood this runsgit prune && git repack && git rerere
- Do you have a slow startup time for new shell sessions? Many devs are using some prompt that shows git status in your prompt. After every command it will use git to check the status of your index. When git is slow in general, this will slow down your interactive shells. One quick solution is to disable that status check in your prompt. For zsh you can do that by running
git config oh-my-zsh.hide-info true
, add a--global
flag if you want to set this option globally.
Last active
July 21, 2022 15:13
-
-
Save jonchurch/b07f59dffed2b7e09f76f538e04713b5 to your computer and use it in GitHub Desktop.
Speed up performance of large git repos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment