@
YoungShook @
123123 哈哈,我查了,也试验了,--mixed 和 --soft 有一点点差别,不过不大,都可以。
--soft
Does not touch the index file or the working tree at all (but resets the head to <commit>, just like all modes do). This leaves all your changed files "Changes to be committed", as git status would put it.
--mixed
Resets the index but not the working tree (i.e., the changed files are preserved but not marked for commit) and reports what has not been updated. This is the default action.
If -N is specified, removed paths are marked as intent-to-add (see git-add(1)).
@
chuan2015 如果直接使用 reset --mixed 或 --soft 话,不会丢失现在的修改,所以没必要 stash.