University to job-ready

Stage 2 · Lesson 6 of 9

Merge conflicts

Clean up your GitHub this month

A happens when two branches change the same lines and cannot decide which version to keep. Git marks the clash inside the file with <<<<<<<, ======= and >>>>>>> lines, showing both versions. You edit the file into the correct combined version and delete the markers.

Then you run git add and commit to finish the merge. Conflicts are normal, not a sign you broke something, and you meet them as soon as two people share a . To keep them small, keep branches short-lived and bring the latest main into them often.

Common trapdeleting the other person's changes to make the conflict go away, so read both sides before choosing.

A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

Practise

Keep handy

Also worth your time

Mark this stage as not done?