The First Merge: Genuinely Clean
git merge --no-ff feature/vegan-notes -m "Merge pull request: vegan-friendly notes"
git push
Master had not changed since this branch diverged — a clean merge, no conflict possible yet.
The Second Merge: A Real, Unavoidable Conflict
git merge --no-ff feature/gluten-free-notes -m "Merge pull request: gluten-free notes"
CONFLICT (content): Merge conflict in dietary-notes.md
Both branches touched the exact same line — master (now carrying vegan-notes' version) and gluten-free-notes genuinely disagree, and git will not guess which one wins.
Resolving It for Real
# edit dietary-notes.md to combine both real changes
git add dietary-notes.md
git commit --no-edit
git push
A real, deliberate resolution — combining both real intents rather than picking one arbitrarily and losing the other.
The Real Lesson About Merge Order
Merging vegan-notes first didn't prevent the conflict — it just meant gluten-free-notes was the one that had to resolve it. Planning merge order genuinely matters for choosing WHO does the resolving (often: whoever's change is simpler, merge first), not for avoiding the conflict outright when two branches truly touch the same line.
feature/vegan-notes and feature/gluten-free-notes both edit dietary-notes.md's very first line — real, independent, well-intentioned changes, made without either author knowing about the other's branch.
This is real integration risk: merging vegan-notes first is completely clean, since master has not changed yet. Merging gluten-free-notes second genuinely conflicts — not because anything went wrong, but because both branches changed the identical line in different ways. The real lesson is not "how to avoid this" (it cannot always be avoided) but "how to plan for it and resolve it calmly."
Integration risk
The real chance that two independently-developed branches will conflict when combined, highest when they touch the same lines of the same files. Confirmed directly in this lab: two branches editing the identical title line produced a genuine, unavoidable conflict on the second merge.
Takeaways
- Two branches editing the exact same line will genuinely conflict on the second merge, regardless of order
- Merge order changes who resolves the conflict, not whether one happens — a real, worthwhile planning decision
- A real conflict resolution should genuinely combine both intents when possible, not silently discard either one
- Integration risk is highest wherever independent branches touch the same specific lines of the same files