Git stash apply and drop
Is there a git command that both applies the stash and removes it?
This as one command:
git stash apply
git stash drop
You want git stash pop
!
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.
git stash pop
will take the first stash in your list (or the one you specify), apply it to your HEAD
, and delete it from the stash list.