下面总结一下git reset的各个选项吧:

1 git reset –soft 只撤销commit,保留working tree和index file。

2 git reset –hard 撤销commit、index file和working tree,即撤销销毁最近一次的commit

3 git reset –mixed 撤销commit和index file,保留working tree

4 git reset和git reset –mixed完全一样

5 git reset –用于删除登记在index file里的某个文件。

相关文章:

  • 2021-07-19
  • 2022-12-23
  • 2022-02-07
  • 2021-10-05
  • 2022-12-23
  • 2021-10-02
  • 2021-08-18
  • 2021-10-06
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-05
  • 2021-07-25
  • 2021-12-14
相关资源
相似解决方案