Course / Level 4: Your Code Has a History / Lesson 8
Undo without fear.
Lesson 8 · Your Code Has a History · Zero to AI Hero by Meegrow Labs
git restore (or git checkout in older Git) undoes changes to a file, reverting it to the last committed state so you can safely discard mistakes without losing your history.