Kelly Mears

Stacked Pull Requests

A chain of dependent changes, each reviewed separately and merged in order.

Version Control & Delivery2 min read213 words12 out · 10 in
also calledPR stackStacking

Stacked pull requests are a sequence of changes where each is based on the previous one rather than on the main branch, so a large piece of work can be reviewed in comprehensible pieces without waiting for each to merge before the next can start.

The benefit is real: reviewers get small diffs, and the author is not blocked. The costs are all coordination.

Every merge invalidates the rest. When the bottom of the stack lands, everything above it needs restacking, and the same is true whenever a sibling change lands on the main branch.

Rebasing must target the actual parent. Rebasing a stacked branch onto the main line gives the shared commits new hashes, so the branch diverges from its own base and every shared file reads as a conflict. Checking what a change is actually based on, before resolving anything, saves the whole exercise.

Automation may treat a stacked base differently. Checks conditioned on the target branch can silently skip for a change targeting a sibling branch rather than the main line — reporting neither pass nor fail. A skipped check reads as green, so anything load-bearing has to be run locally regardless. See Coverage Gate.

Git's rerere helps disproportionately here, since stacked branches share early commits and their conflicts repeat.

See also11

Pull Request

A proposal to merge a branch, carrying review, automated checks, and the discussion around it.

Version Control & Delivery25 connections

Rebase

Replaying a branch's commits onto a new base, producing new commits with the same changes.

Version Control & Delivery19 connections

Merge Conflict

Overlapping changes that a merge cannot combine automatically, requiring a decision.

Version Control & Delivery17 connections

Merge Train

Validating changes against the state they will actually merge into, in order, rather than in isolation.

Version Control & Delivery14 connections

Three-Way Merge

Combining two lines of work by comparing both against their common ancestor.

Version Control & Delivery17 connections

Semantic Conflict

Two changes that merge cleanly and are incompatible in meaning.

Version Control & Delivery15 connections

Branching Model

The convention governing what branches exist, what they mean, and how work reaches production.

Version Control & Delivery18 connections

Continuous Integration

Automatically building and testing every change, so integration problems surface immediately.

Version Control & Delivery38 connections

Force Push

Overwriting a remote branch with local history that doesn't contain it, the operation that makes rewritten history shareable and silently deletes other people's work when used carelessly.

Version Control & Delivery12 connections

Interactive Rebase

Git's tool for rewriting a series of commits before sharing them, reordering, combining, splitting, and rewording them so the history tells a clear story rather than recording every false start.

Version Control & Delivery13 connections

Feature Branch

A branch created to develop one change in isolation before merging it back, a workflow that keeps the main line stable but grows riskier the longer the branch lives, since its divergence from everyone else's work compounds.

Version Control & Delivery16 connections

Linked from10