← 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 →- Q1. After git rebase main, why do your branch's commits have new ids?
- Q2. What is the golden rule of rebasing?
- Q3. What does git merge --ff-only feature/cart do if main and the feature have diverged?
- Q4. Which is true about git merge --squash fix/coupon?
- Q5. Which GitHub merge button puts exactly one new commit on main for the whole pull request?
- Q6. Why is git push --force-with-lease safer than git push --force?
- Q7. You need one bug-fix commit from another branch, not the whole branch. Which command?
- Q8. Merging main into a shared feature branch that three people push to is:
- Q9. In the lesson, "Add cart model" changed from 5686c50 to 2d43900 after the rebase. What happened to the code change itself?
- Q10. Which command lets you combine, reorder or reword several of your own unpushed commits?
- Q11. What does merging main into your feature branch add to the branch's history?
- Q12. Which GitHub merge button keeps every branch commit and makes history linear?
- Q13. What does git commit --fixup <commit prepare?
- 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?
- Q15. What does git cherry-pick <id create?