LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

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.

INSTALL

sudo apt install git
copy
sudo dnf install git
copy
sudo pacman -S git
copy
sudo apk add git
copy
sudo zypper install git
copy
brew install git
copy
nix profile install nixpkgs#git
copy

SEE ALSO

git-gc(1)

Copied to clipboard
Kai