How to uncommit my last commit in Git [duplicate]

How can I uncommit my last commit in git?

Is it

git reset --hard HEAD

or

git reset --hard HEAD^

?

8

Leave a Comment