How to undo the last commit in Git?
Originally Published Here π!
To undo the last commit in Git, you can use the git reset command.
You have 2 ways to undo the last commit:
The first is the
git reset --soft HEAD~1
this command will undo the last commit. For most cases, this command...
melvingeorge-me.hashnode.dev1 min read
Ghost
Self-employed software developer, artist, writer.
Thanks for making this post! I've been doing a lot of resets lately at work, but I remember being clueless as to what to do when caught in this situation at random π