MIDX. Big perf win on giant repos with many packs.
Manages the multi-pack-index (MIDX), an index across all packfiles in a repo. On giant repos with many packs it dramatically speeds up object lookup and enables cross-pack reachability bitmaps.
Without MIDX, Git probes pack .idx files one by one to find an object. MIDX is a single index that maps every object to its owning pack and offset. git maintenance turns this on and keeps it fresh for you.
git multi-pack-index [--object-dir=<dir>] [--no-progress] <subcommand>
write [--bitmap] [--preferred-pack=<name>]
verify
expire
repack [--batch-size=<bytes>]| Flag | What it does |
|---|---|
--object-dir=<dir> | Operate on a non-default object directory (e.g. an alternate). |
--no-progress | Suppress progress output; useful in scripts and CI. |
--bitmap | Write a MIDX reachability bitmap alongside the index (write subcommand). |
--preferred-pack=<name> | Hint MIDX/bitmap generation toward a specific pack. |
--batch-size=<bytes> | Cap how much repack consolidates per invocation. |
expire | ⚠️ Removes packfiles whose objects are fully covered by other packs. |
git multi-pack-index write --bitmapgit multi-pack-index verifygit multi-pack-index expiregit multi-pack-index repack --batch-size=1ggit multi-pack-index write --bitmapgit multi-pack-index verifygit multi-pack-index repack --batch-size=2g && git multi-pack-index expiregit multi-pack-index --object-dir=/srv/git/shared/objects writeHit each option, then Check answers. Score is recorded; Next is always open.