Answers for "how to uncommit in git to back to previous commit"

9

how to uncommit my last commit in git

git reset --soft HEAD^

git reset HEAD^
//And if you actually want to completely undo it, throwing away all uncommitted changes, resetting everything to the previous commit (as the original question asked):

git reset --hard HEAD^
Posted by: Guest on March-18-2020
2

how to uncommit last commit in git

git reset HEAD^
Posted by: Guest on August-04-2020

Code answers related to "how to uncommit in git to back to previous commit"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language