Answers for "how to reset git back to last commit"

33

roll back last commit in git

git reset --soft HEAD~1
Posted by: Guest on March-30-2020
0

git reset to latest commit

git reset --hard HEAD~0
will go to latest commit.


git reset --hard HEAD~1
will go to last but one commit.

Note:  Be careful while running this command. it can't be irreversible
Posted by: Guest on June-29-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language