git reset --soft HEAD^
--Soft
does not delete the workspace to change the code, revoke the commit, and does not revoke git add.
–Mixed
means: do not delete the workspace to change the code, cancel commit, and cancel git add. Operation
This is the default parameter, git reset --mixed HEAD^ and git reset HEAD^ have the same effect.
--Hard
delete workspace change code, revoke commit, revoke git add.
Note that after completing this operation, it is restored to the last commit state.