Git 2.56.0 has been released with changes aimed at making conflict resolution safer and repository maintenance more scalable. The release adds a targeted staging mode for resolved conflicts, shortens some merge-base searches, and removes two restrictions that had limited the use of space-saving path-walk repacks on repository servers.
Safer Conflict Staging
The new git add –resolved mode stages only paths currently marked as unmerged. Before changing the index, it checks selected regular files for remaining conflict markers; if any are found, none of those files are staged. Unrelated tracked changes remain untouched, reducing the risk of accidentally including local work through broader commands such as git add -u or git add -A.
Developers can supply a pathspec to narrow the operation. Resolved deletions and binary conflicts can still be staged because they do not contain textual markers, while the new mode cannot be combined with the broader update or all modes.
Earlier Merge-Base Exit
Git now tracks whether commits exclusive to either side remain in the merge-base traversal queue. Once one exclusive side is exhausted, the search can stop because another common meeting point cannot appear, while still preserving support for histories with multiple valid merge bases.
GitHub reports substantial gains in evaluated repositories. One monorepo case dropped from 0.68 seconds to 0.01 seconds, while production evaluations found many operations around 70 times faster in one large monorepo and an average improvement of roughly 20 times in another. A Linux-kernel case fell from 167,441 traversal steps to 3,887.
Smaller Server-Side Repacks
Path-walk repacking groups objects by their tree location to find better delta relationships. In GitHub's Fluent UI benchmark, it produced a 164.4 MB pack compared with 558.5 MB from an ordinary bitmapped repack, a reduction of about 71%. Git 2.56 makes this approach compatible with reachability bitmaps and delta islands, removing two adoption barriers for repository hosts.
The feature remains opt-in. Server operators can now evaluate its storage benefits without giving up bitmap-assisted object enumeration or the isolation rules enforced by delta islands, but Git does not enable path-walk repacking by default.
Additional Workflow Changes
Other additions include the experimental git history drop command, bulk deletion of merged branches, automatic cleanup options for git bisect run, and a –linearize mode for the experimental git replay command. Partial clones can also manually discard large recoverable blobs through filtered repacking, although the mechanism currently supports only blob:limit filters and requires a promisor remote.
Git 2.56 also improves rename tracking in git log –follow across non-linear histories and addresses several scaling problems. Reported examples include a path-limited diff on a Chromium checkout improving from about eight minutes to 0.07 seconds and reftable tombstone tests falling from roughly 13 seconds to 0.2 seconds.
AI-generated editorial illustration; not a documentary photograph.
Source: Highlights from Git 2.56

Leave a Reply