如果不小心commit了一个不应该commit的修改,但是还没有push,想撤销那个commit。

步骤:

a) git log:获取commit id;

b) git reset --hard commit_id:即:git reset --hard d1a65e9ac9a7c4396206f0072b7fbc9138a26c1f 

相关文章:

  • 2022-12-23
  • 2021-05-13
  • 2022-12-23
  • 2021-11-13
  • 2021-09-24
  • 2022-02-11
  • 2021-06-17
猜你喜欢
  • 2021-11-04
  • 2021-06-09
  • 2021-11-29
  • 2021-09-20
  • 2022-12-23
  • 2021-12-04
相关资源
相似解决方案