Git · Middle · Question 2 of 75
What is the "golden rule" of rebasing?
- 1Always rebase before every single commit
- 2Never rebase a branch that has merge commits
- ✓Correct answer: Don't rebase commits that others have based work on
Explanation
Rebasing replaces commits with new ones. If teammates already have the old ones, their history diverges and they end up with duplicates. Your own unpushed or private branch is fine to rebase.