BeginnerPhone
2 min
Git Merge vs Rebase
GitVersion Control
Advertisement
Interview Question
Explain the difference between git merge and git rebase. When would you use one over the other?
Key Points to Cover
- `git merge` combines branches and preserves history
- `git rebase` rewrites history by applying commits on top of another branch
- Use merge for shared repos; rebase for cleaner local history
Evaluation Rubric
Explains what merge does30% weight
Explains what rebase does30% weight
Provides correct usage scenarios40% weight
Hints
- 💡Think: history preservation vs linear history
Potential Follow-up Questions
- ❓When would rebase cause conflicts?
- ❓Why avoid rebasing public branches?
Advertisement