git stash pop和git stash之间的区别适用 [英] Difference between git stash pop and git stash apply
问题描述
我已经使用 git stash pop
很长一段时间了。我最近发现了有关 git stash apply
命令。当我试用它时,它看起来和 git stash pop
一样。
git stash apply $ c有什么区别$ c $?
git stash apply
将其保留在存储列表中,以便稍后重新使用(或者你可以 git stash drop
它)。
除非 git stash pop
之后存在冲突,否则这种情况不会删除存储,其行为完全像 git stash apply 。
另一种查看方式: git stash pop
是 git stash apply&& git stash drop
。
I've been using git stash pop
for quite some time. I recently found out about the git stash apply
command. When I tried it out, it seemed to work the same as git stash pop
.
What is the difference between git stash pop
and git stash apply
?
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).
This happens unless there are conflicts after git stash pop
, in this case, it will not remove the stash, behaving exactly like git stash apply
.
Another way to look at it: git stash pop
is git stash apply && git stash drop
.
这篇关于git stash pop和git stash之间的区别适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!