CS FundamentalsHardProduct-company MCQ pattern

Two developers branch from the same commit. In which of these situations will git merge report a conflict? 1. Both changed different, non-adjacent lines of the same file. 2. Both changed the same line of the same file in different ways. 3. One deleted a file that the other modified. 4. Both added the identical line at the same place with identical content.

  1. A. Only 2
  2. B. Only 2 and 3
  3. C. Only 1, 2 and 3
  4. D. All four

Correct answer: B. Only 2 and 3

A same-line edit with different content (2) and a modify/delete pair (3) conflict. Edits to different, separated lines merge cleanly (1), and identical changes on both sides are taken once without conflict (4).

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic