在代码未提交到远程分支的时候,如果想撤回commit,可以用git reset --soft 操作

1、查看日志

git log 

2、提交想对应的id,一般是第一个

git reset --soft  commit_id   或者  git reset --soft HEAD^/HEAD~1

 

相关文章:

  • 2022-12-23
  • 2021-10-16
  • 2022-01-17
  • 2021-09-10
  • 2021-08-25
  • 2021-09-30
  • 2021-08-09
猜你喜欢
  • 2022-02-11
  • 2021-11-22
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案