

is the most recently created stash, is the one before it, is also possible). The latest stash you created is stored in “ refs/stash” older stashes are found in the reflog of this reference and can be named using the usual reflog syntax (e.g. Calling “git stash” without any arguments is equivalent to “git stash save”, which we are going to list down later on this post. The modifications stashed away by this command can be listed with “ git stash list”, inspected with the command “ git stash show”, and restored with “ git stash apply” on top of different commit. This command saves your local modifications away and reverts the working directory to match the HEAD commit. When you want to record the current state and index of the dirty working directory, but want to go back to a clean working directory, you can use the command “ git stash”. Lets start discussing about “git stash” command and it’s parameters. In this part of the tutorial series, we will learn how to stash the changes of a working directory and pop it where/when require.

Till now, as part of the Git Tutorial Series we learned about the changes, the commit to the staging area, viewing the working tree status and pushing the changes to the remote repository.

I hope that, you are finding my articles on Git Tutorials helpful.
