回退命令:

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

 

相关文章:

  • 2021-08-25
  • 2022-12-23
  • 2021-09-03
猜你喜欢
  • 2022-02-07
  • 2022-12-23
  • 2022-02-11
  • 2021-11-22
  • 2021-08-15
  • 2022-02-07
  • 2022-12-23
相关资源
相似解决方案