Gitflow
💥Merge Conflict MayhemMedium+500 XP
Workshop
Scenario reference

Merge Conflict Mayhem: the situation, step by step

The situation

You're on `feature-auth` and ready to merge. But Alice pushed 3 commits to `main` editing the same files. Git can't auto-merge.

Both edited auth.js lines 14-28. Your OAuth vs her SAML.

Medium · 5 steps · +500 XP

What you will practice

This scenario walks through 5 steps, in order:

  1. 01Switch to main
  2. 02Merge feature branch (triggers conflict)
  3. 03Check status
  4. 04Stage resolved files
  5. 05Complete merge commit
Reveal the step-by-step commands

Try the terminal first — you learn more by doing. When you want to check yourself, here is the command for each step.

  1. 1. Switch to main
    git checkout main
  2. 2. Merge feature branch (triggers conflict)
    git merge feature-auth
  3. 3. Check status
    git status
  4. 4. Stage resolved files
    git add .
  5. 5. Complete merge commit
    git commit -m "resolve: merge auth"

Key takeaway

Conflict resolved! Communicate before resolving — don't delete others' code.