Apply any stashed content to the current working directory
<
article class="markdown-body">
When you run git stash
, you take all the pending changes from your local directory (including the state) and move it to a temporary stack-like structure called the stash. You can keep stashing changes and the stash keeps filling up.
I say that the stash is a stack-like structure because although you can do a git stash pop
, you still have the ability to take out any item in the stash and not necessarily the latest one.
The simplest way is to list the stash and then apply a particular item in the stash by passing in an index. For exmple, the below command applies the changes in the stash index '3' to the current working directory
git stash list
# This displays a list of all the available stashes
git stash apply stash@{3}