git stash pop
throws away the (topmost, by default) stash after applying it, whereas git stash apply
leaves it in the stash list for possible later reuse (or you can then git stash drop
it).
(git stash pop
在应用它之后抛弃 (最上面,默认情况下)stash,而git stash apply
将它留在隐藏列表中以便以后重用(或者你可以git stash drop
it)。)
This happens unless there are conflicts after git stash pop
, in which case it will not remove the stash, leaving it to behave exactly like git stash apply
.
(除非在git stash pop
之后发生冲突,否则会发生这种情况,在这种情况下它不会删除存储,使其行为与git stash apply
完全相同。)
Another way to look at it: git stash pop
is git stash apply && git stash drop
.
(另一种看待它的方法: git stash pop
是git stash apply && git stash drop
。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…