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里的某个文件。

posted @ 2012-05-09 15:52  wanqi  阅读(1235)  评论(0编辑  收藏  举报