Merge Train
Validating changes against the state they will actually merge into, in order, rather than in isolation.
A merge train — or merge queue — serialises pending changes and validates each against the result of merging every change ahead of it. It exists because a change validated in isolation is validated against a state that will not exist by the time it lands.
The problem it solves is the Semantic Conflict: two changes that are each entirely green and combine into something broken, with no textual conflict anywhere. Nothing about either change can reveal this. Only the combination can.
The manual equivalent, when landing a batch of ready changes at once, is to merge every one into a scratch working copy first, resolve there, and run the full validation once on the union. It is dramatically cheaper than discovering the same information from a broken main branch, and it also catches the mundane version — two changes each editing a shared string, one adding an assertion naming the old value.
Two operational notes. Branch protection settings that appear to enforce up-to-dateness are frequently inert in practice, so non-conflicting changes land back to back with no validation between them; test the assumption rather than relying on it. And rapid successive merges supersede each other's queued validation runs, so only the last one reports.
See also6
Hand-picked in the note itself — the neighbours worth reading next.
Semantic Conflict
Two changes that merge cleanly and are incompatible in meaning.
Version Control & Delivery12 connections
Continuous Integration
Automatically building and testing every change, so integration problems surface immediately.
Version Control & Delivery17 connections
Stacked Pull Requests
A chain of dependent changes, each reviewed separately and merged in order.
Version Control & Delivery9 connections
Three-Way Merge
Combining two lines of work by comparing both against their common ancestor.
Version Control & Delivery11 connections
Trunk-Based Development
Everyone integrating into one shared branch continuously, with short-lived feature branches.
Version Control & Delivery12 connections
Branching Model
The convention governing what branches exist, what they mean, and how work reaches production.
Version Control & Delivery11 connections
Related3
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from9
Notes elsewhere in the wiki that reach for this one.
- Branching ModelVersion Control & Delivery
The convention governing what branches exist, what they mean, and how work reaches production.
- Continuous IntegrationVersion Control & Delivery
Automatically building and testing every change, so integration problems surface immediately.
- Merge ConflictVersion Control & Delivery
Overlapping changes that a merge cannot combine automatically, requiring a decision.
- Pull RequestVersion Control & Delivery
A proposal to merge a branch, carrying review, automated checks, and the discussion around it.
- RebaseVersion Control & Delivery
Replaying a branch's commits onto a new base, producing new commits with the same changes.
- Semantic ConflictVersion Control & Delivery
Two changes that merge cleanly and are incompatible in meaning.
- Stacked Pull RequestsVersion Control & Delivery
A chain of dependent changes, each reviewed separately and merged in order.
- Three-Way MergeVersion Control & Delivery
Combining two lines of work by comparing both against their common ancestor.
- Trunk-Based DevelopmentVersion Control & Delivery
Everyone integrating into one shared branch continuously, with short-lived feature branches.