Git Merge Conflict Simulator

Overview

The Git Merge Conflict Simulator provides a safe environment to practice resolving merge conflicts before encountering them in real projects. Modify code in two different branches, trigger a conflict, and learn how to interpret Git’s conflict markers (<<<<<<<, =======, >>>>>>>). Practice the resolution process interactively without risking your actual codebase.

Open in new tab

Tips

  • Make sure to remove ALL conflict markers (<<<<<<<, =======, >>>>>>>) when resolving - leaving any behind will break your code
  • You have three resolution strategies: keep one version, combine both intelligently, or write entirely new code that supersedes both
  • The code between <<<<<<< HEAD and ======= is from your current branch, code between ======= and >>>>>>> is from the incoming branch
  • Communicate with teammates when resolving conflicts involving their code - they may have context about why they made their changes
  • After resolving, always test your code to ensure the resolution works correctly and doesn’t introduce bugs
  • In real Git, use git status to see which files have conflicts, then resolve them one at a time
  • Practice creating intentional conflicts in the simulator to build confidence before facing them in production work