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 also11
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
Stacked Pull Requests
A chain of dependent changes, each reviewed separately and merged in order.
Version Control & Delivery12 connections
Merge Train
Validating changes against the state they will actually merge into, in order, rather than in isolation.
Version Control & Delivery14 connections
Rebase
Replaying a branch's commits onto a new base, producing new commits with the same changes.
Version Control & Delivery19 connections
Ground Truth
The measurement that arbitrates, as opposed to the artifact that merely reports.
Method99 connections
Continuous Integration
Automatically building and testing every change, so integration problems surface immediately.
Version Control & Delivery38 connections
Trunk-Based Development
Everyone integrating into one shared branch continuously, with short-lived feature branches.
Version Control & Delivery20 connections
Fast-Forward Merge
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
Version Control & Delivery14 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
Git Stash
Git's shelf for uncommitted work, which clears the working tree so you can switch tasks, and the reasons a throwaway commit or a second worktree is often the better shelf.
Version Control & Delivery10 connections
Linked from14
- Cherry-PickVersion Control & Delivery
Copying the change from one commit onto another branch as a new commit, the standard way to backport a fix without merging everything else that came with it.
- Code FormatterVersion Control & Delivery
A tool that rewrites source code into one canonical layout automatically, ending style debates in code review and keeping diffs focused on what changed.
- DiffVersion Control & Delivery
The listing of changes between two versions of a file, the algorithms that compute it, and the unified format that code review, patches, and merges are built on.
- Fast-Forward MergeVersion Control & Delivery
The two basic ways Git joins branches, by sliding a branch pointer forward or by recording a new commit with two parents, and how the choice shapes a project's history.
- Feature BranchVersion Control & Delivery
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.
- Git LFSVersion Control & Delivery
A Git extension that stores large binary files on a separate server and keeps small pointer files in the repository, so history stays light enough to clone.
- Git StashVersion Control & Delivery
Git's shelf for uncommitted work, which clears the working tree so you can switch tasks, and the reasons a throwaway commit or a second worktree is often the better shelf.
- Interactive RebaseVersion Control & Delivery
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.
- 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.
- Staging AreaVersion Control & Delivery
The intermediate snapshot in Git between the working files and the next commit, which lets a developer choose exactly which changes go into each commit, down to individual lines.
- Three-Way MergeVersion Control & Delivery
Combining two lines of work by comparing both against their common ancestor.