git还原到之前某个版本,本地和远程都还原

命令行操作:
第一步: git log 查看之前的commit的id,找到想要还原的版本
第二步: git reset --hard 44bd896bb726be3d3815f1f25d738a9cd402a477   还原到之前的某个版本
第三步: git push -f origin master  强制push到远程


前两步在eclipse中也可操作:

team --> show in hostory

找到想还原的版本


git还原到之前版本


然后再强制push   (git push -f origin master

相关文章:

  • 2021-09-26
  • 2021-10-31
  • 2022-02-07
  • 2021-11-07
  • 2021-08-19
  • 2021-12-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-07
  • 2021-06-17
  • 2022-02-07
  • 2021-11-17
相关资源
相似解决方案