git stash - ghdrako/doc_snipets GitHub Wiki

Stash

the stash is a place where you can hold (stash) files you've modified but not yet committed

 git stash

it takes everything in the work area and in the index and puts it in the stash without committing it. At that point, the work area is reset to the state it was in before you started modifying files—that is the previous position of HEAD.

git stash list
git stash show
git stash clear
git stash drop

--keep-index which allows to stash all changes that were not added to staging area yet.

Keep in mind that applying stash might lead to conflicts if your working area introducted changes conflicting with stash. Therefore, its often safer to run git stash apply instead of git stash pop (the first one does not remove stashed changes).

Last thing to remember is that stashes are only local - you can't push them to remote repository.