git stash pop 命令会在 stash 应用之后丢弃(默认情况下指的是最顶部的)stash,而 git stash apply 会将其保留在存储列表中,以备日后重用(或者您可以在之后使用 git stash drop 命令移除此 stash)。

除非 git stash pop 之后存在冲突,在这种情况下,它将不会删除该 stash,而使其行为与git stash apply 的命令完全相同。

当然,我们也可以使用另一种方式来实现 git stash pop,那就是:git stash apply && git stash drop

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐