Difference between git stash pop and git stash apply
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 apply vs pop : They are almost similar except the fact that git stash pop throws away the (topmost, by default) stash when applying it, whereas git stash apply leaves it within the stash list for possible later use (or you'll then git stash drop it).
see these commands
git stash pop
Throws away the stash after applying it,
whereas git stash apply leaves it in the stash list for possible later reuse.
This happens unless there are conflicts after git stash pop, in which case it will not remove the stash, leaving it to behave exactly as git stash apply.
This happens unless there are conflicts after git stash pop, in which case it will not remove the stash, leaving it to behave exactly as git stash apply.
There is one more way to look at git stash pop is
git stash apply
&&
git stash drop
Hope this helps to resolve your problem.