CS FundamentalsVery hardProduct-company placement · Git
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). What does git diff main...feature show?
- A. Only D's change to b.txt: the diff from the merge base B to feature
- B. Both changes: a.txt reverted and b.txt edited, from main's tip to feature's tip
- C. Only C's change to a.txt: the diff from B to main
- D. Nothing, because three dots are valid only with git log
Correct answer: A. Only D's change to b.txt: the diff from the merge base B to feature
For git diff, A...B means diff from merge-base(A, B) to B, i.e. what feature introduced. git diff main feature (or main..feature) compares the two tips, which would also show C's change in reverse.
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 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…
- A loop while i < n: i = i + 1 (integers) has the invariant i ≤ n. To prove TOTAL correctness rather than only partial correctness, what…