This command is useful for quickly restoring your most recent saved modifications into your workspace while automatically cleaning up the stash list by dropping the applied entry.
When run without arguments, it applies and then deletes the top entry from the stash stack; you can also specify an optional stash reference like stash@{2}
to target a different entry instead of the default. There are no additional flags for this command.
If you want to reapply changes without dropping the stash, use git stash apply
; to manually remove a stash without applying it, use git stash drop
; to save changes you want to stash, use git stash push
; and to view all saved stashes, use git stash list
.