Git is my friend

I know Git is my friend because Git helps me out in a pinch. I think Git's the kind of friend that would help me move...

I'm working on some new features, this morning, and a customer comes in and wants the latest build of their app on their iPhone... ack, I have uncommitted changes on my branch, but I need to checkout their branch. No problem...

git stash
git checkout customerbranch
# build their app
git checkout previousbranch
git stash apply

...and I'm back to where I was a few minutes ago without having to clone another copy of repository or commit unfinished work.

Thanks Git, you're a great friend!

Written on December 16, 2009