Seeing the light of version control

(Originally written on 30 June 2007. Revised on 25 October 2008.)

This article is dedicated to all the programmers who are still not using a version control system. I know you are out there; I was one of you mere weeks ago. But that has changed, and believe me, it's a world of difference.

Maybe you work alone, and maybe you don't go back very often. Maybe you tried CVS or Subversion and decided it's not worth the hassle. I know I did. Remembering what you changed today? Sort files by date! Entering a new phase of the project? Make a backup copy. But after a while, the excuses begin to wear thin. Keeping track of changes in your mind is becoming difficult. You end up working in a team, and keeping your hands off other people's files in not always possible. And then, somebody makes changes to an old version of the software, and you're tasked with integrating them into the latest one...

See, your/my mistake was to think that notions such as "branch", "merging", and "changeset" were invented for the benefit of version control software. But in truth, you/I have been working with such things in the first place; we just did not have any names for them. Whoever invented version control just made them explicit, and most importantly automated everything.

Still, how did I end up using version control? Well, it all started with a presentation of GIT by Linus Torvalds. It was followed by a flurry of blog posts by Mark Shuttleworth. In the end, I got interested enough to do some reading about this "distributed version control" thing. A few tutorials later, I was trying out Bazaar.

I won't turn this post into a Bazaar tutorial. I recommend the one called The Independant. Just a few highlights to wet your appetite:

  • no initial setup is required (beyond configuring your name and e-mail). The project directory is the repository;
  • you need two simple commands to set up a repository, and three more for day-to-day operations. Overall, I've used six or seven commands and three options;
  • to bring someone into the project, just send them a copy of the project directory, or put it up on a Web server. It's that easy.

Yes, it's a command line application. Yes, it runs on Windows, too. Yes, there are graphical front ends if you insist. No, you're out of excuses.