Skip to content

merge-conflict-add-add

operation

in-progress merge with an add/add conflict on src/config.ts

A repository mid-merge, blocked on an add/add conflict.
Both `main` and `feat/x` independently added `src/config.ts`
with different environment values. Running `git merge feat/x`
on `main` detected the conflicting additions and left the merge
uncommitted.

Unlike rename/rename and delete/modify conflicts, git does inject
conflict markers here — the file has `<<<<<<<`, `=======`, and
`>>>>>>>` sections showing both versions. The conflict appears as
an `AA` (added by both) entry in `git status --porcelain`.

Useful for testing:
  - conflict views on newly-created files (no shared ancestor)
  - add/add distinction from standard content (UU) conflicts
  - merge resolution flows where neither side has a "base"
  • main is checked out
  • a merge is in progress (MERGE_HEAD exists)
  • src/config.ts was independently added on both branches with different content
  • src/config.ts has unresolved conflict markers
  • exactly 1 unresolved conflict (AA status: added by both)
conflictmergeadd
feat/xmain
import { spinUpScenario } from '@gfargo/git-scenarios'

const repo = await spinUpScenario('merge-conflict-add-add')
* 3c5fcfd (HEAD -> main) feat: add config for production
| * d9e1e2e (feat/x) feat: add config for development
|/  
* f4ee0a9 chore: initial scaffold

Back to Scenario Browser