Skip to content

Instantly share code, notes, and snippets.

@worenga
Created September 26, 2011 11:34
Show Gist options
  • Save worenga/1242067 to your computer and use it in GitHub Desktop.
Save worenga/1242067 to your computer and use it in GitHub Desktop.
stashing
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: index.html
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: lib/simplegit.py
#
$ git stash
Saved working directory and index state \
"WIP on master: 049d078 added the index file"
HEAD is now at 049d078 added the index file
(To restore them type "git stash apply")
$ git status
# On branch master
nothing to commit (working directory clean)
$ git stash apply --index
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: index.html
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
#
# modified: lib/simplegit.py
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment