Git, Tools

Reference: How to Git Stash

To save the uncommitted changes:

# Either without a name
$ git stash

# Or with a stash name:
$ git stash save funny-stash


To see the list of stashes in your git:

$ git stash list

# Returning a list of results like:
$ stash@{0}: On branch-name: funny-stash
$ stash@{1}: On branch-name: another-stash-name


To apply a stash:

# for the latest one
$ git stash apply

# apply a specific stash, by the index number in the list above
$ git stash apply 1

# apply the latest stash and then remove it from the stash list
$ git stash pop

To clear all your stashes:

$ git stash clear