How To Undo Last Git Commit 1) The easiest way to undo the la | ProgerHub
How To Undo Last Git Commit
1) The easiest way to undo the last Git commit is to execute the “git reset” command with the “–soft” option that will preserve changes done to your files. You have to specify the commit to undo which is “HEAD~1” in this case.
git reset --soft HEAD~1
2) In order to undo the last commit and discard all changes in the working directory and index, execute the “git reset” command with the “–hard” option and specify the commit before HEAD (“HEAD~1”).
Buy ads: https://telega.io/c/progerhubcom. A channel with programming news and tips and tricks, nice for beginners but also for experienced programmers. 💻...