What do the <<<<<<<, ======= and >>>>>>> markers in a file mean?
They are Git's conflict markers. The part between <<<<<<< and ======= is your current branch's version, and the part between ======= and >>>>>>> is the incoming version. You edit the file to the final text and delete all three marker lines.
Explain it simply
When two people rewrite the same line of a shared notice, Git cannot choose. It prints both versions in the file, separated by markers, and waits for you.
The top half, after <<<<<<< HEAD, is what your branch has. The bottom half, ending at >>>>>>> feature, is what came in. Decide what the final text should be: one side, the other, or a blend. Delete the marker lines, save, git add the file and commit. If a marker line is left behind, the code will not compile.
Example
<<<<<<< HEAD
const fee = 49;
=======
const fee = 59;
>>>>>>> feature/pricing
# resolved:
const fee = 59;What to say in the interview
"The markers show both competing versions: above ======= is my current branch, below is the incoming one. I edit to the intended final code, remove all marker lines, stage the file and commit. I always search for leftover markers before committing."
Common mistakes
- Committing with the marker lines still inside the file.