Git 2.56 Adds git add --resolved, git branch --delete-merged, and a history drop Command
Git 2.56 was released on September 28, following the release candidates earlier this month. The headline features target two chores everyone does: resolving merge conflicts and cleaning up old branches.
Conflict resolution: git add —resolved
git add --resolved
Stages only the paths whose conflicts you have resolved, leaving unrelated changes unstaged, and it scans for leftover conflict markers (<<<<<<<, =======, >>>>>>>) so you do not accidentally commit a half-resolved file. Previously the usual git add . swept up everything in the working tree.
Branch cleanup: git branch —delete-merged
git branch --delete-merged
Deletes local branches that are already merged into their tracked remote branches. That replaces a long-lived shell idiom piping git branch --merged through grep and xargs, which our xargs guide shows the hard way.
Other new options
| Command | Change |
|---|---|
git bisect | --reset-when-found returns you to your original state, or to the culprit, when bisecting finishes |
git history | New experimental drop subcommand removes a commit and replays its descendants onto its parent |
git replay | --linearize drops merge commits and linearises history |
git refs | New create, delete, update, and rename subcommands |
git rev-list | --missing-only shows only missing objects |
git repack | --drop-filtered removes local promisor blobs over the limit in partial clones |
git cat-file | --batch-command gains remote-object-info over protocol v2 |
git imap-send | --draft option |
Smaller improvements
- Better typo suggestions for
git pushandgit branch git log --graphdistinguishes parentless root commits visuallygit log --followhandles renames in non-linear history better- Retry when a config file is locked
- Swift support in diff hunk headers
Getting it
Distributions pick up Git releases at different speeds: Arch and Fedora quickly, Debian and Ubuntu LTS much later. Git’s own PPA serves Ubuntu users who want it now. Our Git basics and branching and merging guides cover the workflows these options improve.