Git 2.51 adds cruft-free multi-pack indexes, path walk packing, and improved stash format
Git 2.51 is now available, marking a new update for the widely used distributed version control system. Among its headline features, this release focuses on enhancing multi-pack index repacks. By introducing the repack.MIDXMustContainCruft option, Git now supports cruft-free repacks. This option ensures cruft packs are consistently included, enabling smaller repacks that maintain repository consistency and improve storage efficiency.
Following this improvement, object collection during repacking now benefits from the “path walk” approach. Unlike the prior revision-order object walk, path walk collects and emits all objects from a single path at once. As a result, the packfiles generated with this method can be significantly smaller than those created with previous name hash strategies.
Building on internal workflow features, Git 2.51 introduces a revised stash representation. Multiple stash entries can now be stored as a sequence of commits and exported to a single reference. Users can push or pull these stashes similarly to normal branches or tags, expanding collaboration and migration options.
Rounding out the release, Git 2.51 brings various additional enhancements and bug fixes. It also includes foundational changes that set the stage for the upcoming Git 3.0.