Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Merge Conflicts

Direct answer

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.

When to use this

Use it when configuring, checking or troubleshooting Merge Conflicts in Git.

First 30 seconds

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).

Operational verification

merge → conflict → resolve → test → commit

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Git version-control automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformGit version-control automation · Merge Conflicts owns Git conflict-state interpretation and completion. Application/configuration tests own semantic correctness after resolution.
Scope / prerequisiteUse it when configuring, checking or troubleshooting Merge Conflicts in Git.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points
  • 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.
Key checks
  • git status — conflicted files
  • git diff --name-only --diff-filter=U — list conflicts
  • git 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docGit version-control automation current

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%
Terminology layer

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.

Aliases that resolve here
git merge conflictsresolve conflictsconflict markersrebase conflict
Embedded reference data

Quick lookup tables

Merge Conflicts Git boundary map

Fast local-state, history/ref, remote and downstream proof boundaries for Merge Conflicts.

BoundaryHealthy evidenceSuspicious evidence
Local stateRepository, HEAD, worktree/index and commit IDs are explicitWrong repo/ref, hidden staged/untracked state or mutable-name ambiguity
History / refsAncestry and branch/tag movement match intentUnexpected rewrite, stale tracking ref or unclear merge base
Remote syncURL/refspec, auth and remote read-back match expected commitsLocal assumptions, rejection, stale fetch or unsafe force update
Downstream proofBuild/reconciliation/target is verified independentlyPush/tag/merge success treated as deployment success
Confirmation

Confirm action

Continue?