Reading the Conflict Markers
A real, genuine conflict in two files. Decode exactly what each side changed, directly from the raw markers.
A real README status line and a real config.json setting were both edited on master AND on feature/config-tweaks, independently, while each side was unaware of the other. Merging them produces a real, genuine conflict — git auto-merges what it safely can, and stops cold on what it cannot.\n\nThe real skill this lesson builds is reading the raw conflict markers directly, by hand, before running a single resolution command. Every conflict git ever shows you uses this exact same real format — once you can decode it on sight, no conflict feels intimidating again.
Triggering the Real Conflict
git merge --no-ff feature/config-tweaks -m "Merge pull request: config tweaks"
CONFLICT (content): Merge conflict in README.md
CONFLICT (content): Merge conflict in config.json
Two real, independent conflicts — git auto-merged everything it safely could, and stopped exactly where both sides genuinely disagreed.
git status Never Lies About What's Left
git status
"Unmerged paths" lists every file still needing a real decision — a genuine, always-accurate to-do list for finishing the merge.
Decoding the Raw Markers, By Hand
<<<<<<< HEAD
Status: published
=======
Status: ready for review
>>>>>>> feature/config-tweaks
Three real, fixed parts, in every conflict git ever shows: <<<<<<< HEAD opens YOUR branch's current content, ======= is the real dividing line, and >>>>>>> <branch> closes the INCOMING branch's version. Nothing here requires a git command to interpret — it is plain, readable text.
Merge conflict
Git's honest admission that two branches changed the same real lines in genuinely incompatible ways, and it will not guess which one you want. Confirmed directly in this lab: git auto-merged every other real change, stopping only on the two lines both sides had actually touched.
Conflict markers (<<<<<<< / ======= / >>>>>>>)
A real, fixed text format git inserts directly into the file at each unresolved spot. <<<<<<< HEAD marks the start of your current branch's version; ======= divides it from the incoming branch's version, closed by >>>>>>> <branch-name>. Confirmed directly in this lab decoding both README.md and config.json using nothing but this format.
⚡ Trigger the Real, Genuine Conflict
Merge the diverged feature branch and watch git report exactly where it genuinely cannot auto-merge.
cd ~/team-recipes && git merge --no-ff feature/config-tweaks -m 'Merge pull request: config tweaks'student@lab:~$ cd ~/team-recipes && git merge --no-ff feature/config-tweaks -m 'Merge pull request: config tweaks' Auto-merging README.md CONFLICT (content): Merge conflict in README.md Auto-merging config.json CONFLICT (content): Merge conflict in config.json Automatic merge failed; fix conflicts and then commit the result.
📋 Let git status List What Remains
Confirm exactly which files still need a real decision.
cd ~/team-recipes && git statusstudent@lab:~$ cd ~/team-recipes && git status On branch master Your branch is up to date with 'origin/master'. You have unmerged paths. (fix conflicts and run "git commit") (use "git merge --abort" to abort the merge) Unmerged paths: (use "git add <file>..." to mark resolution) both modified: README.md both modified: config.json no changes added to commit (use "git add" and/or "git commit -a")
🔍 Decode README.md's Real Markers by Hand
Read the raw conflict content directly — no git command needed to understand it.
cd ~/team-recipes && cat README.mdstudent@lab:~$ cd ~/team-recipes && cat README.md # Recipe Collection <<<<<<< HEAD Status: published ======= Status: ready for review >>>>>>> feature/config-tweaks
🔍 Decode config.json's Real Markers Too
The second real conflict, read the exact same way.
cd ~/team-recipes && cat config.jsonstudent@lab:~$ cd ~/team-recipes && cat config.json { <<<<<<< HEAD "servings_default": 4, "unit_system": "imperial" ======= "servings_default": 6, "unit_system": "metric" >>>>>>> feature/config-tweaks }
Lab 2.4.1 complete. A real, genuine two-file conflict, decoded entirely by hand:\n\n\n Real conflict triggered : ✅ two files\n git status confirmed the list : ✅ both unmerged\n README.md decoded by hand : ✅ HEAD vs incoming\n config.json decoded by hand : ✅ HEAD vs incoming\n
Enable JavaScript to run the live terminal and track your progress.