Spot the Rebase Mistake
Find the Mistake Medium
Question
Someone runs this on a shared branch. What is the problem?
Code
git rebase main # on a branch that others have already pulled
Hint
Never rebase shared branches.
Explanation
Rebasing rewrites commit hashes. If others have already pulled the branch, their local commits will have different hashes from your rebased version, causing conflicts and duplicated commits. The golden rule: never rebase branches that others have already checked out. Use merge instead for shared branches.
Related Resources
Related Lessons
Related Cheatsheets
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.