Introduction
git stash to temporarily save changes you are working on.
How to use it
Save changes temporarily
This saves the changes in your current working directory to a stash, leaving your working directory clean.
Apply the stash
This applies the latest stash to the current working directory. The stash remains in place and can be reapplied.
Apply and remove the stash
This will apply the latest stash and remove it from the stash at the same time.
Display a list of stashes
This will display a list of saved stashes.
Apply a specific stash
If multiple stashes exist, you can apply a specific stash by using the format stash@{n}.
Drop a specific stash
To drop a specific stash, use the following command.
This will remove the stash at stash@{1}.
Conclusion
A git stash is useful for temporarily storing changes you are working on so you can do other work or switch branches.