Highlights from Git 2.56

Git 2.56 introduces the git add --resolved flag to safely stage merge conflicts. It scans unmerged files for leftover conflict markers and refuses to stage them if found. This prevents accidental inclusion of unresolved code during merges. The feature targets maintainers handling complex repositories with unrelated local edits.

Cover image for Highlights from Git 2.56

Git 2.56.0 was released by the open‑source project, bringing in contributions from 104 developers, 39 of whom are new. The most visible addition is the git add --resolved flag, which only stages paths that are still unmerged and first checks those files for leftover conflict markers. If any marker is found, the command aborts and leaves the index unchanged, preventing accidental inclusion of unresolved code. The release also improves merge‑base discovery, cutting traversal time in a large monorepo from 0.68 seconds to 0.01 seconds, and removes two restrictions that had blocked path‑walk repacking on server‑side hosts. The new flag gives maintainers a safety rail when merges involve unrelated local edits, reducing the risk of committing partially resolved files. Faster merge‑base calculations speed up operations that rely on common ancestors, such as pull‑request diff generation, with some evaluations showing roughly 20‑times average improvement and up to 70‑times faster runs. Enabling path‑walk repacking without breaking bitmap or delta‑island mechanisms opens the door to significantly smaller pack files, as demonstrated by a 71 % size reduction in a test repository (from 558.5 MB to 164.4 MB). It is not yet clear how widely server hosts will adopt path‑walk repacking now that the technical blockers have been removed. The exact impact on everyday developer workflows for the --resolved mode remains to be measured beyond the examples given. Performance gains for merge‑base searches may vary depending on repository structure, and the documentation does not specify limits for the all‑or‑nothing marker check when a pathspec is used.