Hard Reset Fill
Fill in the Blank Medium
Question
Fill in the blank to discard ALL changes (staged and unstaged) and match the last commit.
Code
git reset ___ HEAD
Hint
The most destructive reset mode starts with --hard.
Explanation
git reset --hard HEAD discards all staged and unstaged changes, making the working directory exactly match HEAD. This is irreversible for uncommitted changes. Use with caution — consider git stash first if you might need the changes.
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.