🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Rebase vs Merge and Clean History: questions with answers

15 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. After git rebase main, why do your branch's commits have new ids?
  2. Q2. What is the golden rule of rebasing?
  3. Q3. What does git merge --ff-only feature/cart do if main and the feature have diverged?
  4. Q4. Which is true about git merge --squash fix/coupon?
  5. Q5. Which GitHub merge button puts exactly one new commit on main for the whole pull request?
  6. Q6. Why is git push --force-with-lease safer than git push --force?
  7. Q7. You need one bug-fix commit from another branch, not the whole branch. Which command?
  8. Q8. Merging main into a shared feature branch that three people push to is:
  9. Q9. In the lesson, "Add cart model" changed from 5686c50 to 2d43900 after the rebase. What happened to the code change itself?
  10. Q10. Which command lets you combine, reorder or reword several of your own unpushed commits?
  11. Q11. What does merging main into your feature branch add to the branch's history?
  12. Q12. Which GitHub merge button keeps every branch commit and makes history linear?
  13. Q13. What does git commit --fixup <commit prepare?
  14. Q14. A branch was already pushed and a teammate may have pulled it. You want to undo one of its commits. What should you use?
  15. Q15. What does git cherry-pick <id create?