Git 2.55: Incremental MIDX Repacking and Smarter Maintenance
Git 2.55 introduces incremental multi-pack index (MIDX) repacking, allowing `git repack` to write and maintain MIDX chains without rewriting the entire index, plus a new `git history` command for fixing up earlier commits.

Git 2.55 landed with over 100 contributors, and the headline feature is incremental multi-pack index (MIDX) repacking. If you maintain large repositories, this is the kind of plumbing improvement that saves you from slow maintenance runs and excessive disk writes.
Incremental MIDX repacking
Git has supported incremental MIDX chains since 2.47, but until now, writing them required separate steps. In Git 2.55, git repack --write-midx=incremental directly creates a new MIDX layer for packs produced by the repack, leaving existing layers untouched. That alone is useful for append-only workflows.
The real win comes when combining --write-midx=incremental with geometric repacking (--geometric=2 -d). The algorithm works in three phases: first, it picks packs not yet covered by any MIDX layer as repacking candidates. If the tip MIDX layer has at least repack.midxNewLayerThreshold packs, those packs also become candidates. Second, it applies the geometric repacking rule to that candidate set and writes a new tip layer. Third, it compacts adjacent MIDX layers when the newer layer's object count exceeds repack.midxSplitFactor of the older layer's count.
This compaction step is metadata-only — it rewrites the MIDX layer without repacking the underlying objects. The result is a chain that grows logarithmically with the total object count, where small, new layers are rewritten often and large, old layers stay untouched. For repositories with steady object churn, this dramatically reduces the cost of routine maintenance.
Fixing up earlier commits with git history
Git 2.55 also introduces git history, a new command for editing earlier commits in a branch. Instead of creating fixup commits and autosquashing, you can directly modify a commit in the middle of your history. The command opens an interactive editor showing the commit series, letting you amend, reword, or reorder commits without the fixup-and-squash dance.
Under the hood, git history uses a rebase-like mechanism but exposes a simpler interface. It's particularly handy for polishing a patch series before sending it for review — you can fix a typo in a commit three steps back without touching the rest of the series.
Both features are available now in Git 2.55. Upgrade and let your maintenance runs breathe.
Discussion
0 Comments
Be the first to start the discussion.