mirror of https://github.com/CrimsonTome/tldr.git
25 lines
375 B
Markdown
25 lines
375 B
Markdown
# git gc
|
|
|
|
> Optimise the local repository by cleaning unnecessary files.
|
|
> Homepage: <https://git-scm.com/docs/git-gc>.
|
|
|
|
- Optimise the repository:
|
|
|
|
`git gc`
|
|
|
|
- Aggressively optimise, takes more time:
|
|
|
|
`git gc --aggressive`
|
|
|
|
- Do not prune loose objects (prunes by default):
|
|
|
|
`git gc --no-prune`
|
|
|
|
- Suppress all output:
|
|
|
|
`git gc --quiet`
|
|
|
|
- View full usage:
|
|
|
|
`git gc --help`
|