Library / Shipping & operations / Merge conflict
No. 145·noun·also called git conflict, conflicting changes, conflict markers

Merge conflict

What happens when two sets of changes edit the same part of a file and the tool can't decide which one wins.

SPECIMEN · DIAGRAM · COMPARE

Your branch

  • Button says "Buy now"
  • Same line, edited

Main branch

  • Button says "Get started"
  • Same line, edited

Merge conflict

  • Git can't pick one
  • Stops and asks you
  • You choose or combine
Definition

What it is

A merge conflict appears when you combine two versions of the code, and both changed the same lines in different ways. Git won't guess, so it stops and marks the file with both versions, often between lines of <<<<<<< and >>>>>>>, and waits for a person to choose.

It happens when work runs in parallel: you and an agent on separate branches, two agents at once, or a teammate editing the same page. Most merges go through fine. A conflict only means the same lines were touched twice.

Resolving one means deciding what the final lines should say: keep yours, keep theirs, or combine both. An agent can do it, but tell it which side wins for what. Otherwise it may quietly drop someone's work.

A merge conflict is not a bug in your app. It's a question the tool needs answered before it can continue.

Say it like a builder

How to ask for it

Vague

“It says something is wrong when I try to combine my changes with the main version. Can you just fix it?”

Precise

“Resolve the merge conflict in pricing.tsx between my branch and main. Keep the new pricing table from my branch and the updated footer links from main, then show me the final file before you commit.”

Why it works

"Something is wrong" gives the agent no rule for choosing; naming the merge conflict and which side wins for each part stops it from silently overwriting work.

In the wild

You've seen this in

  • GA red "This branch has conflicts that must be resolved" notice on a GitHub pull request
  • CCursor or VS Code showing "Accept Current / Accept Incoming" buttons above a file
  • TAn agent stopping mid-task with "CONFLICT (content): Merge conflict in" in the terminal
Usage note

Often confused with