CS FundamentalsHardInfosys · Product placement

Assertion (A): You should not rebase commits that others have already based work on. Reason (R): Rebasing creates new commits with new hashes, so collaborators' histories diverge from the rewritten branch.

  1. A. A is true but R is false
  2. B. A is false but R is true
  3. C. Both A and R are true, but R does not explain A
  4. D. Both A and R are true and R explains A

Correct answer: D. Both A and R are true and R explains A

Because rebased commits are new objects, anyone who built on the old ones now has duplicates and messy merges. That is exactly why rebasing is reserved for unpublished or private branches.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic