Highlights from Git 2.56
Git 2.56 introduces tools to simplify merge conflict resolution and speed up repository operations, including a new git add --resolved mode and optimized merge-base calculations.
Git 2.56.0, released by the open source Git project, includes contributions from 104 developers, 39 of whom are new. The update follows the previous 2.55 release and introduces features aimed at improving workflow efficiency. Among the changes, the new git add --resolved mode addresses a common issue during merge conflicts by staging only unmerged paths and scanning for leftover conflict markers before proceeding. This prevents unintended staging of unrelated changes or files still containing conflict markers.
The release also enhances merge-base calculations, which are critical for operations like three-dot diffs and pull request comparisons. Git 2.56 optimizes the process by tracking exclusive commit sides, allowing it to stop traversal earlier when no new merge bases can appear. This change significantly reduces processing time in large repositories, with one monorepo case showing a drop from 0.68 seconds to 0.01 seconds and others averaging 20 to 70 times faster.
Git 2.56 removes long-standing restrictions on path-walk repacking, enabling repository hosts to leverage its storage savings without sacrificing reachability bitmaps or delta islands. The update allows path-walk repacking to generate bitmaps and perform delta-island bookkeeping, making it compatible with existing infrastructure. This change does not enable path-walk repacking by default but removes adoption barriers for large hosts evaluating its benefits.
Additional updates in Git 2.56 include performance improvements for the Linux kernel's merge-base command and a fix for a long-standing issue. The release also introduces other features and updates not covered here, with full details available in the official release notes. Users are encouraged to review the notes for a comprehensive overview of changes.