CS FundamentalsVery hardProduct-company placement · Git

On main you run git merge -s ours feature in one repository and git merge -X ours feature in a copy. Which statement is correct?

  1. A. Both give the same tree, because 'ours' keeps main's side of every file in either case
  2. B. -s ours fails unless there are conflicts, while -X ours always succeeds and keeps both sides
  3. C. -s ours keeps main's tree and drops all of feature; -X ours merges, preferring main only in conflicts
  4. D. -X ours drops feature's changes completely, while -s ours resolves only conflicting hunks for main

Correct answer: C. -s ours keeps main's tree and drops all of feature; -X ours merges, preferring main only in conflicts

The 'ours' strategy ignores the other branch's content entirely and only adds the parent link. The recursive/ort strategy with option -X ours performs a real merge and uses main's version only for conflicting hunks.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic