Thursday, December 4, 2008

Git Stashes

You know you like your stash, who doesn't? But when you stash, the simple way git stash it gives you these ridiculous titles so if you had more than one when you do git stash list you would see things like:
stash@{0}: WIP on branchname: 9cb5fe9... Merge branch 'branch' of git@github.com.....
What the hell is that? What is on that stash?

If instead you did git stash save "comments describing this stash"

then when you did git stash list you would see
stash@{0}: On branchname: comments describing this stash
To get the stash off, and you do git stash apply, it pulls off those changes but it leaves the stash in place so you would still see it if you did git stash list. To get the stash off AND delete it do git stash pop instead (think of it poping off the list of stashes).

LeahC hasn't had to use mulitple stashes yet....so no word on how to take advantage of that.

No comments: