commands.sh

git gc

all

Optimise the local repository by cleaning unnecessary files.

More info →

Examples (5)

Optimise the repository

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
made by @shridhargupta | data from tldr-pages