CS FundamentalsHardProduct-company placement · DevOps

Pull requests A and B each pass CI against main and are merged one after the other, after which main fails to build: A renamed a function that B newly calls. What practice prevents this?

  1. A. Three separate merge commits, one for each branch, made in the order given
  2. B. One merge commit with four parents, called an octopus merge
  3. C. An error, because Git can only ever merge one branch into main at a time
  4. D. A fast-forward of main to f3, whose history then also contains f1 and f2

Correct answer: B. One merge commit with four parents, called an octopus merge

Each PR was tested against an old main, so their combination (a semantic conflict with no textual conflict) was never built. A merge queue serialises merges and tests the real resulting commit before it lands.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic