1、git reset --hard HEAD^ 对于commit的内容回退到上一个版本 2、git checkout -- file 丢弃工作区的修改 3、git reset HEAD file 撤销缓存区的修改 4、