Git Rebase Purpose
Multiple Choice Medium
Question
What does git rebase do?
Hint
rebase replays commits onto a new base.
Explanation
git rebase <branch> takes your branch commits and replays them on top of the specified branch, creating a linear history. Unlike merge which creates a merge commit, rebase rewrites commit history. This makes the history cleaner but changes commit hashes. Never rebase commits that have been pushed and shared with others, as it causes inconsistencies.
Related Resources
Related Lessons
- Git Merge
Learn git merge.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.