Skip to content

Instantly share code, notes, and snippets.

@carnivore
Created May 28, 2011 16:20
Show Gist options
  • Save carnivore/997001 to your computer and use it in GitHub Desktop.
Save carnivore/997001 to your computer and use it in GitHub Desktop.
How to Git Stash
# Sometimes you want to patch in some changes while you're working,
# but you don't want to make a commit. In this case, use git stash.
# Stash your work (any will do)
$ git stash save
$ git stash
# Do your magic
# See what you got
$ git stash list
# Apply
$ git stash apply stash@{0}
# Clean up (any will do)
$ git stash drop stash@{0}
$ git stash pop
$ git stash clear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment