mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-31 04:41:47 +00:00
30 lines
473 B
Plaintext
30 lines
473 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# git gc
|
|
|
|
> Optimise the local repository by cleaning unnecessary files.
|
|
> More information: <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`
|
|
|
|
- Display help:
|
|
|
|
`git gc --help`
|