闽公网安备 35020302035485号
$ git checkout -p # Answer y to all of the snippets you want to drop另外一个方法是使用 stash, Stash所有要保留下的内容, 重置工作拷贝, 重新应用保留的部分。
$ git stash -p # Select all of the snippets you want to save $ git reset --hard $ git stash pop或者, stash 你不需要的部分, 然后stash drop。
$ git stash -p # Select all of the snippets you don't want to save $ git stash drop