Step 1 of 11
Git merge conflicts: what you'll practise
In this lesson you practise Git branching and merge conflicts with hands-on exercises: you make a conflict on purpose, read its markers and resolve it. You also see when Git merges by itself, and how rebase differs from merge.
Here is the whole story in six moments: two branches change the same line of a price list, the merge stops, and someone decides.
In this lesson you'll:
- see a branch for what it is: a name that points at a commit
- predict when a merge is clean and when it conflicts
- read
<<<<<<<,=======and>>>>>>>, then resolve, stage and commit - compare merge and rebase, and get out of either safely
It takes about an hour: 30 minutes of ideas you can play with, then a real conflict in your own terminal, practice exercises and a final quiz.
Takeaway: a conflict is not an error. It is Git asking a person to decide.