回滚命令:

1.回退到上个版本

$ git reset --hard HEAD^

2.回退到前2次提交之前,以此类推,回退到n次提交之前

$ git reset --hard HEAD~2

3.退到/进到 指定commit的sha码

$ git reset --hard commit_id

然后强推到远程:

$ git push origin HEAD --force

相关文章:

  • 2022-02-10
  • 2022-02-17
  • 2021-12-07
  • 2021-10-26
  • 2021-11-03
  • 2021-12-17
  • 2022-02-06
  • 2021-07-04
猜你喜欢
  • 2022-01-14
  • 2022-01-03
  • 2021-07-26
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案