MikhbarMIKHBAR
Artificial Intelligence

GitHub Stacked Pull Requests Reach General Availability

GitHub has officially announced the general availability of stacked pull requests, empowering developers to break down large changes into smaller, independently reviewable units.

GitHub Stacked Pull Requests Reach General Availability

General Availability Announcement

GitHub has officially launched stacked pull requests as generally available, allowing developers to break large modifications into smaller, focused pull requests that can be reviewed independently and combined later. Since the feature went into public preview, repositories utilizing stacks have experienced a 9% increase in merged code compared to peers. Additionally, over two-thirds of the top 1% of repositories now use stacked pull requests, achieving a 5% improvement in their time-to-merge metrics.

This general availability release follows valuable user feedback and introduces several refinements designed to streamline creation, code reviews, and merging workflows. Developers can access more comprehensive instructions and guidelines through the official stacked pull requests documentation to get started with the new capabilities.

Enhancements to Rebasing and Approvals

With the latest update, approvals remain intact for unchanged code. When a stack is updated after its base branch moves ahead—such as the main branch—the 'Rebase stack' function now preserves existing approvals, even within repositories configured to dismiss stale approvals. Furthermore, rebased commits retain their cryptographic signatures. GitHub generates signed replacement commits during a rebase action to preserve original authorship. Automatic rebases following partial merges also ensure replacement commits are properly signed if branch rules or original commits demand it.

User permissions have also been expanded to better fit established workflows. Users who hold permissions to bypass repository rules can now leverage those specific permissions to merge the lowest unmerged pull request inside a stack. Concurrently, stacks now enter and move through the merge queue as a unified single merge group rather than being fractured across multiple groups.

Automated Workflows and Branch Management

Branching stacks now support automated retargeting. If a stack's base branch is deleted, GitHub automatically retargets the stack instead of closing its bottom pull request, effectively accommodating workflows where one stack branches off another. Additionally, an auto-merge feature for stacked pull requests is rolling out incrementally over the next few weeks, enabling developers to configure a group of pull requests to merge automatically once all individual repository merge criteria are successfully satisfied.

To help developers track changes more efficiently, stack context is now permanently visible within the persistent header of the pull request page. Users can view essential stack details directly from the main pull request list view. Navigation has also been optimized via new keyboard shortcuts, allowing engineers to use Shift + J and Shift + K to move seamlessly between pull requests in a stack.

Ecosystem Integration and Availability

The lifecycle of stack memberships is now more transparent. Developers can examine timeline events showing precisely when a pull request joins or leaves a stack, while the pull_request webhook incorporates a specialized stacked action whenever a pull request is integrated into a stack. For command-line users, the gh stack extension for the GitHub CLI now integrates support for Git worktrees alongside numerous performance updates to accelerate initialization, checkout, and code navigation.

Stacked pull requests are available immediately across all standard github.com plans and are scheduled for inclusion in an upcoming GitHub Enterprise Server release. Comprehensive insights and community practices continue to be tracked across broader developer collaboration tools.

Sources

Continue chronologically

Related entity coverage