Git 2.56.0 Adds History Cleanup, Reference Management and Partial-Clone Improvements

A sturdy bridge under construction between orderly code-like blocks and an unfinished but solid structure, symbolizing Git's path toward a major version change.

The Git project has released Git 2.56.0 with new tools for rewriting history, managing references and reducing storage used by partial clones. The release also includes changes intended to prepare Git's internals for a planned Git 3.0 transition.

More direct history operations

The new git-history(1) drop subcommand removes a selected commit and rebases its descendants onto the commit's parent, updating descendant branches affected by the rewrite. Git 2.56.0 also adds –linearize to git-replay(1), allowing experimental server-side rebases to handle commit ranges containing merge commits by flattening them.

Reference and branch maintenance

git-refs(1), introduced in Git 2.46, can now create, delete, update and rename references, with update and delete optionally checking an expected previous value before making a change. Branch maintenance gains –forked for finding branches associated with an integration branch and –delete-merged for removing branches whose tips are already reachable from their configured upstreams. These filters depend on branches tracking the relevant integration branch.

Smaller partial clones

For repositories using partial clones, git-cat-file(1) can request remote object metadata through its batch-command mode without transferring the object itself. The source illustrates this with a 3,000,000-byte blob whose size can be obtained without downloading its contents. A new –drop-filtered option for git-repack(1) also removes large promisor blobs stored locally, allowing Git to fetch them again when needed.

A staged Git 3.0 path

According to the GitLab account, discussions at the Git Contributor Summit produced a proposed sequence that would move from Git 2.56 to 2.98, followed by Git 2.99 and Git 3.0 together. Git 2.99 is planned as an LTS release so platforms without a Rust toolchain can continue receiving updates, while Git 3.0 would enable the breaking-change feature flag. The source notes that ecosystem support remains a constraint, including for SHA-256 repositories and Git forges, and gives no planned release date for Git 3.0.

AI-generated editorial illustration; not a documentary photograph.

Source: What's new in Git 2.56.0?

Share this article
FacebookThreadsLinkedInX

Leave a Reply

Your email address will not be published. Required fields are marked *