CS FundamentalsVery hardProduct-company placement · Git interview
How many of these situations can produce a merge conflict when merging branch B into A from their common ancestor O? 1. A and B changed the same line differently. 2. A deleted a file that B modified. 3. A and B added different files with the same path and different contents. 4. A changed line 10 and B changed line 200 of the same file. 5. A and B made the identical change to the same line.
- A. 4
- B. 2
- C. 3
- D. 1
Correct answer: C. 3
1, 2 (modify/delete) and 3 (add/add) conflict. Changes to distant lines merge cleanly, and identical changes on both sides are taken once without a conflict.
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
- Feature X takes the 'happy path' through 5 screens. An alternate flow can occur at screen 2 (2 variants) and an exception flow at screen 4…
- A mobile app shows the error rate of a new release, rolled out to 10% of users as a canary, at 1.2% against 0.4% for the old version on…
- Assertion (A): A test suite that mocks every collaborator of every class can pass while the integrated system fails. Reason (R): Mocks…
- A single-page app makes 30 sequential API calls to render a dashboard, each taking about 40 ms of network round trip. The team cannot…
- A Scrum team's velocity over 6 sprints was 20, 22, 35, 21, 23 and 19 points; sprint 3 included a one-off batch of over-estimated stories…
- An enterprise service-level agreement promises 99.95% monthly availability with service credits, the internal SLO is 99.99%, and the…