
The next screen shot shows using git stash without any arguments. Here I’ve got a change to the file ready to be staged or stashed.
Git stash drop how to#
I’ve created a simple repository with a single file to show some examples of how to use git stash. The documentation shows the full list of options for git stash. While there are more options available for git stash this list contains the majority of what is needed for normal usage.

Once the changes have been saved the source tree is returned to the state of the latest commit. What happens when this comes at a point that I’m not ready to commit? git stash to the rescue! Just as the name indicates git stash allows changes to be stashed away for later use. For me these interruptions often come in the form of: Please switch to working on this other thing. Heck they’re even common for me when I’m working by myself. Interruptions are fairly common when working on a large project.
