Why conflicts happen
A merge conflict occurs when Git cannot safely combine competing changes. The most common case is when two branches modify the same lines in incompatible ways.
Conflict markers
Git places markers such as <<<<<<<, ======= and >>>>>>> in conflicted files. You must edit the file into the desired final form, remove the markers, test the result and stage the resolved file.
Do not blindly choose one side
The correct resolution often combines ideas from both branches. Read the surrounding code and understand the intent of both changes before resolving the conflict.