I committed my work (note not pushed) in a known good state. I have since made unwanted local changes (without committing or pushing them). What is the command to undo these changes and revert to my previous commit state?
Please accept my apologies for the beginner question but the suggestions turned up by my googling seem arcane and I would like to be confident in my actions.
From Pro Git Commnuity book:
Fixing mistakes
If you've messed up the working tree, but haven't yet committed your mistake, you can return the entire working tree to the last committed state with
$ git reset --hard HEAD
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With