intermediate · 29 minute study
Resolve the intended behavior, not just the markers
Two independently useful changes can conflict textually. Resolve them by preserving the agreed behavior and verifying the integrated result.
Useful preparation · 1 prerequisite
Use this as a map, not a lock. If these ideas are familiar, continue.
- Branches are names that move through a graph — Reason about diverging work and merging without assuming a branch is a separate folder or that every merge creates the same history shape.
First, build a mental model
A merge conflict means Git cannot choose a text result automatically. You supply the intended combined behavior. Removing markers and staging the file records your choice; neither action proves that the choice is correct.
- Read the common base and both changes to identify each author's intent.
- A conflict can need a combination, a redesign or one selected behavior; blindly accepting all ours or theirs can erase useful work.
- After resolving, inspect the final file, stage it and use the continuation command for the operation in progress.
- Run checks on the integrated result. A clean automatic merge can also combine semantically incompatible code.
- Start integration from a controlled working tree. An abort is an escape from an in-progress operation, not a general guarantee to reconstruct unrelated uncommitted edits.
// Common base: retries = 1, timeoutMs = 2000.
// HEAD intentionally raises retries to 3.
// feature/timeouts intentionally raises timeoutMs to 5000.
<<<<<<< HEAD
const policy = { retries: 3, timeoutMs: 2000 };
=======
const policy = { retries: 1, timeoutMs: 5000 };
>>>>>>> feature/timeouts
// The markers shown above are a conflict fixture, not valid JavaScript.- Base
The shared starting policy has one retry and a 2000 ms timeout.
- Separate intents
One branch changes retries; the other changes timeout.
- Resolution
If both requirements remain valid, the intended combined policy is retries 3 and timeoutMs 5000.
Production thinking
Take this beyond the example.
Resolve in a bounded branch, keep both intents visible in review and rerun relevant checks after integration. Treat the final combined snapshot as the candidate that needs evidence.
Sources and further reading
Your evidence
unseen is a local learning signal, not a credential or proof of production competence.
Explain the mental model, then explicitly acknowledge it. Opening a page is not evidence.
Supported retries can complete this lesson. Independent evidence and delayed review determine the skill stage.
Next lesson · Replaying a change creates new history objects →