Merge Conflict
Overlapping changes that a merge cannot combine automatically, requiring a decision.
A merge conflict arises when two lines of work modify the same region and the merge algorithm cannot determine the correct combination. Git marks the region with both versions and hands it to a person.
Resolving well is a design activity, not a text-editing one. The question is what the code should be given both intentions, which sometimes means neither side verbatim.
Several practical points recur:
Resolve toward the branch's own trajectory. A branch may already contain a commit that deliberately reconciles the very interface in conflict, sitting at its tip. Reading the branch's log before proposing a resolution avoids overriding a decision that was already made — and inventing a third design forces the author to rewrite their work.
Preserve per-commit shape when rebasing. Resolving each intermediate commit toward the branch's final design, rather than jumping straight to it, keeps each commit sound.
A reported conflict is not always real. Hosting platforms cache mergeability and go stale in both directions. Performing the merge locally is the only ground truth; a conflict a platform reports and the tool cannot reproduce should never be hand-resolved.
Additive conflicts have a standard answer. Two branches adding properties to one interface conflict wholesale; the resolution is the union, in whatever order the file already uses.
See also5
Hand-picked in the note itself — the neighbours worth reading next.
Three-Way Merge
Combining two lines of work by comparing both against their common ancestor.
Version Control & Delivery11 connections
Rebase
Replaying a branch's commits onto a new base, producing new commits with the same changes.
Version Control & Delivery10 connections
Semantic Conflict
Two changes that merge cleanly and are incompatible in meaning.
Version Control & Delivery12 connections
Ground Truth
The measurement that arbitrates, as opposed to the artifact that merely reports.
Method30 connections
Stacked Pull Requests
A chain of dependent changes, each reviewed separately and merged in order.
Version Control & Delivery9 connections
Related3
Nearby in the graph rather than deliberately chosen. Looser, sometimes surprising.
Linked from5
Notes elsewhere in the wiki that reach for this one.
- Merge TrainVersion Control & Delivery
Validating changes against the state they will actually merge into, in order, rather than in isolation.
- 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.