当执行commit后,还没push时想撤销
git reset --soft HEAD~1
后缀~1表示上1次commit当版本
另外补充一下:
如果想修改当是commit注释内容则使用amend
git commit --amend