Problem with git reset commit

Hi everybody!

I’m doing the Dasmoto’s Arts & Crafts project from the Full Stack Career Path, and I’m having a bit of a challenge here.
So I made a mistake on my HTML file, and so I’ve used the git reset commit (last 7 digits of previous commit) to rewind back to a previous commit.
All good, I’ve typed git show HEAD to double check if I was on the intended commit and I was, however my HTML file didn’t revert to my previous changes meaning, it remained the same…
I thought that when you revert back to previous changes, it indeed corrects the mistakes on said document.
Could someone please shed some light on what am I doing wrong?

Thank you so much

Exactly what you want to do here depends a little on whether you’ve made additional commits, the following might be a useful read to work out what it is that you’re resetting-

Normally git reset won’t affect the working directory (it’s one that risks losing actual work though you can override this behaviour with flags). If it’s just a single file you want to change consider git restore instead, e.g. git restore - Discard or unstage uncommitted local changes | Learn Version Control with Git (or use a checkout for a single file if you prefer).

1 Like