看来,当我执行git stash apply时,我需要输入git stash drop以便从可用的存储中删除该存储。我可以在一个命令中执行此操作吗?
答案 0 :(得分:7)
git stash pop
正是您正在寻找的。正如man page所说:
pop [--index] [-q|--quiet] [<stash>]
Remove a single stashed state from the stash list and apply it on
top of the current working tree state, i.e., do the inverse operation
of git stash save. The working directory must match the index.
Applying the state can fail with conflicts; in this case, it is not
removed from the stash list. You need to resolve the conflicts by hand
and call git stash drop manually afterwards.