crab repack
Consolidate remote Git pack files.
Synopsis
crab repack [OPTIONS]Description
crab repack applies Git's geometric pack policy to remote Git pack files.
Over time, many pushes can leave many small packs in the remote. Repacking
rolls up the smallest required set and atomically updates the active pack list,
while leaving large stable packs intact. Immutable recovery history continues
to retain old packs by default, so repack first optimizes active reads. To
reclaim superseded storage, explicitly prune older recovery generations and
then run repository GC.
Apply mode validates the complete source and replacement Git object graphs,
uses the repository maintenance lease, and does not report success until Git
visibility, locator coverage, and the generation receipt are durable. Dry-run
does not download packs; structured output retains the current byte count in
bytes_after rather than presenting it as an estimated replacement size.
For conceptual background, see Repacking Objects.
Options
| Option | Default | Description |
|---|---|---|
--dry-run | false | Show repack plan without executing |
--json | false | Emit structured JSON output |
Examples
crab repack --dry-run
crab repackRelated Commands
crab gc— remove unreachable objects first.crab optimize packs— grouped optimize namespace for pack consolidation.crab compact— compact metadata layers.