Merge conflicts: why they happen and what to do
Why two branches can clash on the same line, what GitHub shows when they do, how to read conflict markers and resolve a simple conflict in the browser, and why choosing the right text is a product decision.
Lesson 6 of 15~34 min of learningIncludes ~19 min for questions and tasks
Contents1 of 67 steps
You
Alex Tutor
main, the live site and Emma's work are all exactly as they were. The pull request just waits for someone to make a decision.Alex Tutor
Rewrite delivery page copy#132
This branch has conflicts that must be resolved. Conflicting file: pages/delivery.md
Raise free-delivery threshold to 1000 UAH#133
Merged yesterday as commit 6f2c8a1
You
Daniel
Alex Tutor
Question 1
Pull request #132 shows "This branch has conflicts that must be resolved". This means the delivery page on the live site is broken right now.
- Open
Rewrite delivery page copy#132
This branch has conflicts that must be resolved
Alex Tutor
Alex Tutor
e7c3b19Add summer promo bannerf02a6d4Update FAQ answerse19c3b7Rewrite delivery page copycontent/delivery-copy8be2f70Add cat treats bundle6f2c8a1Raise free-delivery threshold to 1000 UAH (#133)main
Commit graph, oldest first: content/delivery-copy and main today 1. commit e7c3b19 on main "Add summer promo banner" 2. branch content/delivery-copy starts from commit e7c3b19 3. commit f02a6d4 on main "Update FAQ answers" 4. commit e19c3b7 on content/delivery-copy "Rewrite delivery page copy" (highlighted) 5. commit 8be2f70 on main "Add cat treats bundle" 6. commit 6f2c8a1 on main "Raise free-delivery threshold to 1000 UAH (#133)" (highlighted)
Alex Tutor
You
Daniel
Alex Tutor
Alex Tutor
Question 2
Since Emma's branch split from main, both sides have changed something. In which cases will GitHub report a conflict? Select all that apply.
Alex Tutor
Resolve conflicts button. It opens a simple editor right on GitHub, with the conflicting file already loaded.You
Alex Tutor
<<<<<<< opens the conflict and names the branch the upper version came from. ======= divides the two versions. >>>>>>> closes the conflict and names the other branch.Daniel
git merge in the terminal. Same arrows, different window.You
Alex Tutor
Question 3
Match each part of the conflict in pages/delivery.md with what it means.
Tap an answer, then tap the row it belongs to. You can also drag.
<<<<<<< content/delivery-copy=======>>>>>>> main- Lines outside the markers
Answers left to place
You
Alex Tutor
You
Alex Tutor
Daniel
Alex Tutor
Alex Tutor
Question 4
The conflict in pages/delivery.md:
<<<<<<< content/delivery-copy
Orders from 800 UAH ship free, right to your door.
=======
Free delivery on orders from 1000 UAH.
>>>>>>> main
The threshold went up to 1000 UAH in #133 at finance's request, and marketing approved Emma's new wording. What should replace the whole block, markers included?
Alex Tutor
Daniel
=======, and then it turns up on the live page. I've seen it happen. To other people, of course.Alex Tutor
Mark as resolved tells GitHub this file is settled. If several files conflict, you pick the next one from the list on the left and repeat.You
Commit merge.Alex Tutor
Files changed tab should now show just Emma's rewrite, with 1000 in line 12 and no trace of 800.Alex Tutor
Question 5
Put the steps for resolving the conflict in #132 on GitHub in order.
Tap an item, then tap where it should go. You can also drag or use the arrows.
You
Commit merge actually commit? And where?Alex Tutor
main. GitHub merges main into content/delivery-copy, with your decision inside. As of 2026 its message reads "Merge branch 'main' into content/delivery-copy".Alex Tutor
e7c3b19Add summer promo bannerf02a6d4Update FAQ answerse19c3b7Rewrite delivery page copy8be2f70Add cat treats bundle6f2c8a1Raise free-delivery threshold to 1000 UAH (#133)mainc90d4e7Merge branch 'main' into content/delivery-copycontent/delivery-copy
Commit graph, oldest first: After Commit merge 1. commit e7c3b19 on main "Add summer promo banner" 2. branch content/delivery-copy starts from commit e7c3b19 3. commit f02a6d4 on main "Update FAQ answers" 4. commit e19c3b7 on content/delivery-copy "Rewrite delivery page copy" 5. commit 8be2f70 on main "Add cat treats bundle" 6. commit 6f2c8a1 on main "Raise free-delivery threshold to 1000 UAH (#133)" 7. merge commit c90d4e7: main merged into content/delivery-copy "Merge branch 'main' into content/delivery-copy" (highlighted)
You
Daniel
main's history: main gets one clean commit for #132.Alex Tutor
Alex Tutor
Question 6
Someone resolved a conflict in pull request #145 with GitHub's editor. What does the highlighted commit b2 tell you?
a1Add about pageb1Rewrite our story sectiona2Update team photos (#141)mainb2Merge branch 'main' into content/about-pagecontent/about-page
Commit graph, oldest first: Pull request #145 after a conflict was resolved on GitHub 1. commit a1 on main "Add about page" 2. branch content/about-page starts from commit a1 3. commit b1 on content/about-page "Rewrite our story section" 4. commit a2 on main "Update team photos (#141)" 5. merge commit b2: main merged into content/about-page "Merge branch 'main' into content/about-page" (highlighted)
Alex Tutor
Resolve conflicts and says the conflict is too complex for the web editor.Daniel
Alex Tutor
You
Files changed afterwards.Alex Tutor
Alex Tutor
Question 7
A copy conflict blocks a pull request for a page you're responsible for. Which of these are part of a PM's job? Select all that apply.
Alex Tutor
main moved on without it.You
Daniel
main changes underneath it.Alex Tutor
main into a longer branch early, while conflicts are still small.You
Alex Tutor
Question 8
Which of these pull requests is most likely to run into a merge conflict?
Fix typo on returns page#151
1 commit · 1 file · opened yesterday · 0 behind main
Add Halloween banner#152
2 commits · 2 files · 3 days old · 1 behind main
Update courier phone number#153
1 commit · 1 file · 2 days old · 2 behind main
Redesign all product pages#148
23 commits · 38 files · 6 weeks old · 41 behind main
Alex Tutor
Daniel
You
Alex Tutor
Question 9Short answer · AI-checked task
Daniel will review pull request #132 tomorrow. Line 12 of pages/delivery.md now reads "Orders from 1000 UAH ship free, right to your door.", which matches neither his version nor Emma's original. Write a 2–3 sentence comment on #132: what the line says after the conflict was resolved, and why.
Write your answer and get a score with feedback from our AI reviewer.
Log in to get AI feedbackYou
Daniel
Alex Tutor
That’s the lesson. You answered every task — nicely done.