Use it when configuring, checking or troubleshooting Merge Conflicts in Git.
Merge Conflicts
Merge conflicts occur when Git cannot automatically choose a single result for competing changes; resolving them requires reconstructing intended semantics, not merely deleting conflict markers.
1. Conflicts occur when the same lines changed.
2. Understand both sides.
3. Resolve, test, commit.
4. Keep branches short-lived to reduce conflicts.
5. Abort if needed (git merge --abort).
merge → conflict → resolve → test → commit
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
operation context → base/competing versions → conflict paths → semantic resolution → staged result → final integrated tree/history → project validation → publication
Healthy evidence: base and competing intent are understood, each resolution is deliberate, full diff is reviewed, tests pass and final history is as intended.
Step 2 Failure modes and next checks Narrow the fault
Suspicious evidence: blind ours/theirs selection, deleting markers without understanding behavior, skipping tests or abort/continue confusion that loses context.
Step 3 Common mistakes Narrow the fault
- Resolving conflicts by taking one side blindly.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Conflict markers removed ≠ merge semantically correct; a syntactically clean file can still combine logic incorrectly.
- Ours/theirs labels ≠ always intuitive source/destination during rebase; operation context changes interpretation.
- All files staged ≠ all conflicts correctly resolved; staging records a choice but does not validate it.
- Conflict resolved locally ≠ collaboration complete; final history still needs review, tests and publication.
git status— conflicted filesgit diff --name-only --diff-filter=U— list conflictsgit mergetool— resolve with tool
ReferenceWhat it is1 section · depth on demand
Core model
Identify base/ours/theirs or rebase equivalents, understand why the paths diverged, resolve each conflict intentionally, stage the chosen result and validate the complete integrated tree.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
Git accepting conflict resolution shows the index no longer contains unresolved entries, but it does not show the chosen content is semantically correct.
In depth
A merge conflict occurs when two branches change the same lines (or one deletes what the other modifies), and Git cannot decide which version to keep. Git marks the conflict in the file and stops the merge until a person resolves it.
<<<<<<< HEAD
ntp_servers: [10.0.0.123, 10.0.0.124]
=======
ntp_servers: [10.0.0.125]
>>>>>>> feature/new-ntp
Documented example, not captured output.
git status # lists conflicted files
# edit files, keep the correct combination, remove markers
git add group_vars/all.yml
git merge --continue # or git rebase --continue
git merge --abort # give up and return to before
For configuration files, resolve conflicts by understanding the intent of both changes, then run linting and rendering tests before committing.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Git > Merge Conflicts. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://git-scm.com/docs · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Merge Conflicts Git boundary map
Fast local-state, history/ref, remote and downstream proof boundaries for Merge Conflicts.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Local state | Repository, HEAD, worktree/index and commit IDs are explicit | Wrong repo/ref, hidden staged/untracked state or mutable-name ambiguity |
| History / refs | Ancestry and branch/tag movement match intent | Unexpected rewrite, stale tracking ref or unclear merge base |
| Remote sync | URL/refspec, auth and remote read-back match expected commits | Local assumptions, rejection, stale fetch or unsafe force update |
| Downstream proof | Build/reconciliation/target is verified independently | Push/tag/merge success treated as deployment success |