sábado, diciembre 27, 2008

git-stash

git-stash is a really cool command, it let you save a work in progress, for example you are developing a new feature in your application, and still your changes are not ready to do a commit, and you must switch of branch (or another option that requires that indexes are up to date), so what can you do?, easy, just use git-stash it will save your current changes and then will revert to the last commit, then you do what ever you need to do, and when you are ready to back to your work simply use git-stash pop (or you can use the man page to other options)


freyes@yoda:rascase.git$ git stash list
stash@{0}: WIP on rewrite-items: 52cfbe4... [items] registered the new items with gobject
freyes@yoda:rascase.git$ git stash pop
# On branch rewrite-items
# Changed but not updated:
# (use "git add ..." to update what will be committed)
#
# modified: rascase/views.py
# modified: setup.py
#
no changes added to commit (use "git add" and/or "git commit -a")
Dropped refs/stash@{0} (74b9490b8bf8b22f5b1e687e5c0bc881719f6763)

No hay comentarios.: