回退命令:

$ git reset --hard HEAD^ 回退到上个版本
$ git reset --hard HEAD~3 回退到前3次提交之前,以此类推,回退到n次提交之前
$ git reset --hard commit_id 退到/进到 指定commit的sha码

强推到远程:

$ 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-09-23
  • 2022-01-17
  • 2022-12-23
相关资源
相似解决方案