git gc
Optimize the local repository by cleaning unnecessary files. More information: https://git-scm.com/docs/git-gc.
- Optimize the repository:
git gc
- Aggressively optimize, takes more time:
git gc --aggressive
- Do not prune loose objects (prunes by default):
git gc --no-prune
- Suppress all output:
git gc --quiet
- Display help:
git gc --help
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
