If you want to back it up, you need to set it up…

So once you have a website, and have hemmed and hawed over it enough to make it barely presentable, you’ll need to start coding. But wait!! You can procrastinate coding, by doing one more thing… setting up a code repository. Essentially, this means that you’ll be able to get your hands on your code, even if something happens to your beloved machine. (‘Wait,’ you say, ‘What code? You’ve been gallivanting around doing anything but coding over the last few days. Build that game I say!’). All in time man, chill!

1. You need to find an appropriate repo. I found BitBucket, and found it be quite reasonable(read free!). It didn’t hurt that Atlassian is now involved with them, and so I’m quite sure their service will be pretty good. Setting up an account there proved to be pretty easy.

2. Choosing a GIT client wasn’t that hard as well. I’ve always been a fan of Tortoise, so when I heard they had TortoiseGit as well, there was no two thoughts about it. The installation procedure is over here: http://code.google.com/p/tortoisegit/

3. Syncing up. I now needed to get my bitbucket account and repo working together. When you log in to your account at bitbucket, it gives you the option to either import code or start from scratch. Choosing the latter, it takes you through a complete step by step procedure of how you set it up. (By now, you’d have the Tortoise GUI and the msysgit installed, as per the previous step). On clicking the highlighted ‘Set up GIT’ option, you’re taken to this link(since you now probably have TortoiseGIT, ignore the installation steps for the GIT executable mentioned at this link): https://confluence.atlassian.com/display/BITBUCKET/Set+up+Git+and+Mercurial

4. Learning how to use it. Following the step, you’ll learn to setup the first repository. First, we clone the repo onto the local machine, and then we test it by adding, committing and pushing a readme file. Now, there will still be doubts on how you actually use this repository to sync, push and pull changes. So it might be worthwhile to give the documentation of Git a look-see: http://git-scm.com/documentation

The best part about Git is that it allows you to maintain a copy of your repository on your local machine, so operations like diff and going to previous revisions, not to mention branching and tagging, become a breeze.

Aaaand that’s it. Push and pull as much as you want. You now have a working repository!