← 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?
- A.Git renames commits randomly
- B.Rebase creates new commits with a new parent, and the id depends on the parent
- C.The ids are only shortened differently
- 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 →