在最近的回答中,他详细介绍的典型应用案例git-reset的三个最常用的选项(--hard,--mixed,和--soft),托雷克顺便提到的是git-reset还提供了两个比较深奥的标志,被称为--merge和--keep.该git-reset手册页描述了如下的两个标志:
Run Code Online (Sandbox Code Playgroud)--merge Resets the index and updates the files in the working tree that are different between <commit> and HEAD, but keeps those which are different between the index and working tree (i.e. which have changes which have not been added). If a file that is different between <commit> and the index has unstaged changes, reset is aborted. In …