🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Rebase vs Merge and Clean History: all 15 questions

Quiz: Rebase vs Merge and Clean History · Question 1 of 15

After git rebase main, why do your branch's commits have new ids?

After git rebase main, why do your branch's commits have new ids?

  1. A.Git renames commits randomly
  2. B.Rebase creates new commits with a new parent, and the id depends on the parent
  3. C.The ids are only shortened differently
  4. D.Rebase deletes your changes
Answer & explanation

Correct answer: Rebase creates new commits with a new parent, and the id depends on the parent

A commit's id is computed from its content and its parent, so replaying it on a new base gives a new id.

Can you get the rest right without peeking?

Take the timed Quiz: Rebase vs Merge and Clean History quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →