Repaso
EspaƱol

What is a merge conflict?

Options

  1. Two branches that happen to have different names in the repository
  2. Git cannot combine changes because both sides edited the same lines (Correct option)
  3. A failed test that is caused by a recent commit in a branch
  4. 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.

Key terms

Practice this question in Repaso