Git 2.56 shipped with a new git add --resolved command that stages only files already marked resolved in a merge conflict, and refuses to stage a file if it still contains leftover conflict markers, according to the GitHub Blog.
The release also speeds up merge-base calculations by stopping the history search earlier once a common ancestor is found. On one monorepo, traversal time dropped from 0.68 seconds to 0.01 seconds, and the same command on the Linux kernel's repository fell from 0.29 seconds to 0.01 seconds, GitHub said.
Repository hosts can now combine path-walk repacking with bitmaps and delta islands, a combination that shrank one benchmark repository from 558.5 MB to 164.4 MB, about 71% smaller, according to GitHub. The release also adds an experimental git history drop command for removing commits and a new git refs command for managing references.
The release drew 104 contributors, 39 of them new to the project, GitHub said.
The merge-base fix is the one that saves time day to day: any workflow that runs git merge-base or relies on it under the hood, including most pull request diffs, gets faster on a large repository with no configuration change.