Tuesday, March 20, 2012

Stashing in Git

If you're working on a branch and which to switch to another for some reason without committing,
or you wish to try out something on the current branch, you can save your current state to the
stash .
Use
git stash save


When you're ready to continue what you were working on, go back to the branch that you used
stash on and use:
git stash apply

If you don't want to use your stash anymore, and just work from your last commit, use
git stash clear

For a more thorough run-through on git-stashing , check out
http://ariejan.net/2008/04/23/git-using-the-stash

No comments:

Post a Comment