Applying a Git stash non-destructively
Posted 8th February 2021 in Development and Git
git stash pop
grabs a stash and dumps the changes on your current branch. It also deletes the stash. It can sometimes be useful to keep the stash if it’s something that you want to reapply on another branch.
git stash apply
Like git stash pop
, you can apply a particular stash, rather than the most recently stashed stash. So if you want to apply the changes made in the next-to-last stash, as well as keep the stash in your stash list:
git stash apply stash@{1}