Reset vs Revert Concept
Concept Check Medium
Question
What is the key difference between git reset and git revert?
Hint
One rewrites history, the other adds to it.
Explanation
git reset moves the branch pointer to a different commit, effectively rewriting history — commits after the target become unreachable. git revert creates a NEW commit that inverses a previous commit's changes, preserving the original history. Use revert for shared branches (safe) and reset for local branches (rewrites history).
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.