It appears that when I do git stash apply, I need to then type in git stash drop in order to remove that stash from the available stashes. Can I do this in one command?
git stash pop is what you're looking for. As the man page says:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With