What is a merge conflict?
Options
- Two branches that happen to have different names in the repository
- Git cannot combine changes because both sides edited the same lines (Correct option)
- A failed test that is caused by a recent commit in a branch
- A repository that was deleted by mistake from the server
Answer
Git cannot combine changes automatically because both sides edited the same lines differently
Why
Git merges most changes automatically. When two branches change the SAME lines in different ways, Git cannot know which version is right.
It marks the spot with <<<<<<<, ======= and >>>>>>>. You edit the file to keep the correct result, then commit.
Small, frequent merges reduce conflicts.
Remember
Conflict = same lines changed on both sides; you decide.