LinuxCommandLibrary

git-repack

Pack loose objects into pack files

TLDR

Repack objects

$ git repack
copy
Repack aggressively
$ git repack -a -d
copy
Repack with delta compression
$ git repack -a -d --depth=[250] --window=[250]
copy
Repack all objects
$ git repack -A -d
copy
Repack with geometry
$ git repack --geometric=[2]
copy

SYNOPSIS

git repack [options]

DESCRIPTION

git repack consolidates loose objects into pack files, improving storage efficiency and access time. It reorganizes the repository's object database by combining individual loose objects into compressed packs.
Repacking is useful after many small commits or after importing objects. The `-a -d` combination is common for aggressive repacking that removes redundant packs.

PARAMETERS

-a

Pack all objects.
-A
Pack all reachable objects.
-d
Remove redundant packs.
-f
Force delta recomputation.
--depth n
Delta chain depth.
--window n
Delta window size.
--geometric factor
Geometric repacking.
-l
Local objects only.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community