2017-12-03 14:37:44 +00:00
|
|
|
# git gc
|
|
|
|
|
|
|
|
> Optimise the local repository by cleaning unnecessary files.
|
2019-06-03 01:06:36 +01:00
|
|
|
> More information: <https://git-scm.com/docs/git-gc>.
|
2017-12-03 14:37:44 +00:00
|
|
|
|
|
|
|
- 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`
|
2017-12-04 08:59:30 +00:00
|
|
|
|
|
|
|
- View full usage:
|
|
|
|
|
|
|
|
`git gc --help`
|