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

下面总结一下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里的某个文件。

原文地址:https://www.cnblogs.com/wanqieddy/p/2491910.html