Reset --hard Quiz
Multiple Choice Medium
Question
What does `git reset --hard HEAD` do?
Hint
--hard is destructive and cannot be undone easily.
Explanation
git reset --hard HEAD discards all staged and unstaged changes, making your working directory exactly match the last commit (HEAD). This is destructive — uncommitted changes are permanently lost. Use git stash if you want to save changes temporarily instead.
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.