CS FundamentalsVery hardProduct-company placement · Git
On main you run git merge f1 f2 f3, where the three branches touch different files and none conflict. What results?
- A. Three merge commits, one for each branch, in the order given
- B. A single merge commit with four parents (an octopus merge)
- C. An error, because Git can merge only one branch at a time
- D. A fast-forward to f3 that also contains f1 and f2
Correct answer: B. A single merge commit with four parents (an octopus merge)
Merging several heads at once uses the octopus strategy and records one commit whose parents are main's tip and the three branch tips. It refuses to proceed if any conflict needs manual resolution.
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
- A developer on Windows opens a repository created on Linux, edits one line of a file, and git diff shows every line changed. What is the…
- A product manager ranks 8 candidate requirements with the Analytic Hierarchy Process, comparing every pair once. How many pairwise…
- A team can (A) build a module in-house: 60% chance of gaining ₹50 lakh and 40% chance of losing ₹20 lakh; (B) buy a licence for a certain…
- Usability studies model the share of problems found by n test users as 1 − (1 − L)ⁿ, where L is the probability that one user reveals a…
- Which feature characterises the RAD (Rapid Application Development) model?
- The suite { classify([]), classify([1, -2]) } runs against the function below. Treating each if, the for loop (enter / skip-or-exit) and…