CS FundamentalsVery hardGATE CS · TCS NQT Prime · Product Company SDE
What does `git rebase` do differently from `git merge` when integrating a feature branch onto main?
- A. Merge rewrites commit hashes; rebase never does
- B. Rebase replays the feature branch's commits one by one on top of main's latest tip, rewriting their hashes and producing a linear history; merge instead creates a new merge commit joining the two histories as they are
- C. They are functionally identical in every respect
- D. Rebase deletes the feature branch's commits entirely
Correct answer: B. Rebase replays the feature branch's commits one by one on top of main's latest tip, rewriting their hashes and producing a linear history; merge instead creates a new merge commit joining the two histories as they are
Rebase re-applies each commit from the feature branch on top of the new base, generating new commits with new hashes and a linear history; merge instead preserves both branches' actual commits and adds one extra merge commit.
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
- Why might a team deliberately choose NOT to use story points and instead estimate tasks directly in hours?
- For a embedded mode project with Basic COCOMO effort E = 131.1 person-months, the development time formula is D = 2.5 × E^0.32 months…
- A mutation test run generated 40 mutants. 6 are equivalent mutants and 28 were killed. What is the mutation score, excluding equivalent…
- Why does depending on abstractions (interfaces) rather than concrete classes, as the Dependency Inversion Principle recommends, make unit…
- A deployment strategy routes 100% of production traffic to a brand-new environment all at once, after it has been fully tested in…
- A feature flag (feature toggle) used alongside continuous deployment allows a team to: