Git 2.56 Is Here: Drop Commits Cleanly, Sweep Stale Branches, and Stop Your Agents Breaking Things
Git 2.56 adds git history drop, branch --delete-merged, and dramatic monorepo speedups — plus safety guardrails designed for the era of AI coding agents.
The release built for the agent era
Git 2.56 shipped in late September with the usual mix of speed and safety — and a theme that's new: it's the first Git release designed for a world where AI coding agents run Git at machine speed. An agent that opens branches, resolves conflicts, and rebases will hit every rough edge in the tool constantly, and a conflict marker staged into a shared branch becomes verification debt someone has to find. As Mitch Ashley of The Futurum Group put it: refusing to stage files that still contain conflict markers and previewing branch deletions are the guardrails agent workflows need.
Whether or not you use AI agents, this is a genuinely useful release. Here's what matters.
The headline features
- git history drop (experimental): remove a single commit from the middle of your history and Git replays everything after it onto the new parent. What used to require a careful interactive rebase becomes one command. It doesn't handle merge commits yet — run git log --merges on your range first; if it prints anything, the command will refuse.
- git branch --delete-merged: finally, a built-in way to sweep away local branches whose work already landed upstream. Pattern matching plus a --dry-run flag so you can preview the carnage. If you've been piping git branch output through grep and xargs for a decade, retire the pipeline.
- git refs: the low-level reference commands — create, update, delete, rename — consolidated into one toolbox with optional old-value checks that act as compare-and-swap protection.
- git add --resolved: stages files after you fix merge conflicts, and refuses to stage files that still contain conflict markers. This is the single best guardrail in the release.
- git repack --drop-filtered: reclaim disk in partial clones by discarding on-demand blobs (say, files over 1MB) that can be fetched again later. A Google Summer of Code project, now shipping.
- git bisect run --reset-when-found: finds the culprit commit and snaps back to your original commit in one step.
Plus friendlier touches: type git push origin/main when you meant origin main and Git now suggests the fix; git log --follow tracks paths more reliably through non-linear history.
The speedups are real
Performance makes up most of this release, and the numbers GitHub posted are unusually dramatic. Merge-base computation used to walk backward through history longer than needed; 2.56 simply stops once one side runs out of exclusive commits. On the Linux kernel repo, git merge-base --all v4.8 v4.9 dropped from 167,441 traversal steps to 3,887 — 0.29 seconds to 0.01. Two large production monorepos saw cases roughly 70x faster in one and about 20x on average in the other. A Chromium checkout's git diff went from eight minutes to 0.07 seconds. If you work in a monorepo, upgrade for the speed alone.
The fine print
Two things to know before upgrading. First, the exit-code behavior changed: scripts that treated exit code 129 as the help-request signal will now see 0. It'll fail quietly rather than loudly, so scan your tooling. Second, look ahead: Git 3.0 is where the breaking changes land — SHA-256 as the default hash, Rust as a required build dependency, and main as the default branch name. No release date yet, but treat 2.56 as the last quiet stop before it.
Try git history drop on a copy of a branch before you trust it on a real one. And if you run agent-assisted workflows, watch whether your platform team makes the new safety options defaults — that's the canary for how seriously they take agent guardrails.
For more on the tooling around modern development, see Google's Developer Knowledge API and Perplexity's open-sourced sandbox — or the one-developer Rust rebellion against Adobe for proof that open source is still where the interesting fights happen.


