写完代码后,我们一般这样

git add . //添加所有文件

git commit -m "本功能全部完成"

执行完commit后,想撤回commit,怎么办?

 

git reset --soft HEAD^

这样就成功的撤销了你的commit

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

https://www.cnblogs.com/lfxiao/p/9378763.html

相关文章:

  • 2021-09-15
  • 2021-09-28
  • 2021-12-08
  • 2022-12-23
  • 2022-12-23
  • 2021-08-30
猜你喜欢
相关资源
相似解决方案