For a new nodeJS project I’m working on in collaboration with a few other developers, we’re using Git in combination with Github, and I’m finally learning how to use Git the right way, with branches, several remote repositories, and all the other good stuff that makes everyone love Git.

But this weekend I ran into a serious problem: my computer died, and I found that I left my charger at work. We have a major milestone we need to hit on Monday, and I was up a creek.

Thankfully, a friend of mine said I could use her Mac to work on it. I had saved my development work in a Dropbox folder, so I went to Dropbox and shared it with her. Then I downloaded Git, nodeJS, and Sublime Text 2 to get my dev environment ready.

I generated a couple of new SSH keys for Github, and checked

git config --list

Lo and behold, everything was there. My remote repo’s, my commit history, everything. Part of the genius of Git is that everything is stored in files in your working directory.

I can’t stress this enough: put your development directory in your Dropbox. You never know when you’ll need it, and with Git, you’ll be set to go in a matter of minutes even in the worst case scenario. I’m considering adding the installers I use to develop to the directory just to make the process even more painless.

Let me know if you have any other tips about using Git, I’m still learning all the good stuff it can do.