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?
- A. Both give the same tree, because 'ours' keeps main's side of every file in either case
- B. -s ours fails unless there are conflicts, while -X ours always succeeds and keeps both sides
- C. -s ours keeps main's tree and drops all of feature; -X ours merges, preferring main only in conflicts
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- main and feature split at commit B. Since then main has gained commit C (editing a.txt) and feature has gained commit D (editing b.txt)…
- main has A-B-C. feature branched from B and has D-E. On main you run git merge feature, creating merge commit M (first parent C, second…
- Which practice is characteristic of the Cleanroom software engineering process?
- A project has budget at completion ₹900 lakh, earned value ₹360 lakh and actual cost ₹420 lakh. What is the to-complete performance index…
- The Jelinski–Moranda model says the failure intensity before the i-th failure is φ(N − i + 1), where N is the initial number of faults and…
- In McCall's quality model, factors are grouped under product operation, product revision and product transition. Match each factor with…