Dev News Daily ENDE

Git 2.56 adds git add --resolved and git branch --delete-merged

Git 2.56.0 has been released with 748 non-merge commits since version 2.55.0, contributed by 104 people, 39 of them first-time contributors, according to the release announcement published on LWN.

Several additions target everyday conflict and branch handling. git add gains a --resolved option that stages paths whose conflicts have been resolved while leaving unrelated local changes alone, and it checks the files for leftover conflict markers, aborting if it finds any. git branch learns --delete-merged, which removes local branches already merged into their remote-tracking branches, and git branch -d now reports when a branch cannot be deleted because an active bisect is using it. git bisect gets a --reset-when-found option that returns automatically to the original state, or to the culprit, when the search ends.

The experimental git history command gains a drop subcommand that removes a commit and replays its descendants. git replay learns --linearize, which drops merge commits in the way git rebase --no-rebase-merges does. The git refs toolbox gets create, delete, update and rename subcommands.

For partial clones there are two changes: git cat-file --batch-command gains remote-object-info, which asks a server over protocol v2 for an object's size and type without downloading it, and git repack learns --drop-filtered to delete local promisor blobs above a size limit. Help requested with -h or --help now exits with status 0 instead of 129, and configuration file locking retries briefly so that concurrent writers no longer fail at once.

Git 2.56 adds git add --resolved and git branch --delete-merged
Git 2.56 adds git add --resolved and git branch --delete-merged — Dev News Daily

What it means

Most of these turn a scripted habit into a flag. Teams that keep a shell alias to prune merged branches, or a check for stray conflict markers before committing, can replace it with a built-in that the Git project now tests. The exit-code change is the one to check in automation: a script that treated 129 from a help call as expected will now see 0.