KrisGuoQin / Blog

博客,记录知识点与问题
0 stars 0 forks source link

撤销上一次提交 #6

Open KrisGuoQin opened 4 years ago

KrisGuoQin commented 4 years ago

git commit 之后发现提交错了,如果想撤回提交,使用

git reset --soft HEAD^

通过这种方式就撤销了你的commit

注意,仅仅是撤回commit操作,写的代码仍然保留。