吾八哥博客

您现在的位置是:首页 > DevOps > 代码管理 > 正文

代码管理

git撤销commit到未提交状态的方法

吾八哥2021-03-29代码管理1379
commit后未push之前可以使用如下方法,将commit撤销到未提交状态.切回Changestobecommitted状态:git reset --soft 

commit后未push之前可以使用如下方法,将commit撤销到未提交状态. 切回Changes to be committed状态:

git reset --soft HEAD^

切回Changes not staged for commit状态:

git reset HEAD^