Recall & Review
beginner
What does 'git rebase' do?
It moves or reapplies your branch changes on top of another branch, creating a cleaner, linear history.
Click to reveal answer
beginner
What is the main effect of 'git merge'?
It combines two branches by creating a new commit that joins their histories, preserving all commits as they happened.
Click to reveal answer
intermediate
When should you prefer rebasing over merging?
Use rebase when you want a clean, linear history without extra merge commits, especially before sharing your work.
Click to reveal answer
intermediate
When is merging a better choice than rebasing?
Merge when you want to keep the full history and context of how branches combined, or when working with shared branches.
Click to reveal answer
advanced
What is a risk of rebasing shared branches?
Rebasing shared branches can rewrite history others rely on, causing confusion and conflicts.
Click to reveal answer
What does 'git rebase' do to your commits?
✗ Incorrect
'git rebase' moves your commits to a new base, replaying them on top of another branch.
Which command preserves the exact history of both branches?
✗ Incorrect
'git merge' preserves the full history by creating a merge commit.
When should you avoid rebasing?
✗ Incorrect
Avoid rebasing shared branches because it rewrites history others depend on.
What is a benefit of merging?
✗ Incorrect
Merging keeps all commits and branch history intact.
Which command would you use to update your feature branch with the latest main branch changes without merge commits?
✗ Incorrect
'git rebase main' reapplies your commits on top of the latest main branch, avoiding merge commits.
Explain in your own words when you would choose to rebase instead of merge.
Think about how you want your project history to look.
You got /3 concepts.
Describe the risks of rebasing a branch that others are using.
Consider what happens if you change something others already have.
You got /3 concepts.