Skip to Content

Free TUAW iPhone app -- try it now!
AOL Tech

Filed under: Developer, Windows, Commercial, Freeware, Open Source

Dev Chair : Version control for beginners


Put up your hand if you do not consider yourself a software developer but know what 'version control', 'CVS', or 'Subversion' is.

Good, you guys can stop reading now and come back for the next post.

The rest of you may want to stick around and find out why version control software may be something you need but do not know it exists.

Why would you need Version Control?
You may think that version control software is only for 'proper' or hardcore developers. But let's say you host your own blog on a web host. There are many files to maintain for the blog system, let alone the configuration files, the style/template files, the plug-in files, etc. Wouldn't it nice if you can take a snapshot of the whole system every time your blog is in a semi-satisfying state? Or may be you are a Linux user, you probably have a bunch of shell scripts that you use and tinker with everyday. Wouldn't be cool if you can go back to the copy of a script you have last Tuesday at 1:09 AM before you decided (erroneously) that half of the script was junk? How about you are a writer and want to take a snapshot of your novel? Sure you can save multiple copies of your file but if you have spent some time renaming files on your hard disk and append "1", "2", or "old" to the file name, then you are prime candidate for a version control system.

If you're still reading, hopefully I have convinced you the virtue of storing critical and often changed files on a version control system.


What is 'Version Control'?

At the most basic level, version control software maintains a backup copy of files you add to its repository. But it does more than just basic backup. Each time you 'save' a file in the repository, the version control software also marks the new file with a version. So the first time you save a file into the repository, the file will be marked as version 1.0. The next time, it will be marked 2.0 (or 1.1 depending on the naming scheme) and so on. This means that if you need to revert back to a specific version it will be trivial to do so.

Version control software provides many other functions pertinent to software development such as locking, branching, merging, etc. More information can be found on Wikipedia.

Version Control Software

There are great number of version control software out there. The most popular ones such as CVS and Subversion are free, while others more sophisticated are not.

CVS
CVS was originally built on RCS, which is a pretty old system. I used RCS at my first job over 10 years ago, it is that old! CVS includes all of the functionality that most developers would ever need, and is very popular among Open Source projects. There are a few glaring deficiencies though. Namely, renaming files while retaining version history are not part of the system and requires a series of manual steps. Same with moving files. Despite these shortcomings, CVS should serve the need for most people.

Subversion
Subversion is developed as a successor of CVS and contains many fixes for CVS's shortcomings. Renaming and moving files are designed as part of the system from the beginning so it is trivial to do that, and Subversion also provides true atomic operation. This will allow easy rollback of a particular file (or group of files) commit, whereas in CVS it would requires digging through logs to match files and reverts it one by one manually. Subversion is also Open Source and very popular with OSS community.

Client software
Whichever system you choose to use, you will need the corresponding client software on your desktop in order to 'talk' to the repository on the server. The client software also performs some very useful function, the most important of all are file comparison and merging. Again, there are great many choices out there. I would not mention all of them, but here are the ones that I have used and would recommend:

TortoiseCVS and TortoiseSVN - Free, open source clients. Tight integration with Windows Explorer, making them seamless to use.
SmartCVS - Multi-platform Java CVS client. 'Smart' in most places but merging terminology is backward! Free but also has 'Professional' version.

As with all software, try them out before you commit to using one (pun intended!). Version control client is a very personal kind of software. It needs to perform the job quickly and smoothly while not impeding the developer's chain of thoughts and workflow. So try each one out and pick the one that fits your style.

Where to host?
You can host the version control software and repository locally. This will require good knowledge of either *nix or Windows services and database, and is not really the route for non-technical or causal users. Also, self-hosting will not make your content safer if there is not a comprehensive backup strategy for your machine.

The easier route (though may not be free) is to use one of the online version control host. You pay them a nominal periodic fee and they take care of all the nitty-gritty details of maintaining a server for you. The extra benefit of using an online host is that your data is now offsite which provides an extra layer of redundancy in the event of hardware failure, nature disaster, thief, etc.

I use CVSDude which provides both CVS and Subversion hosting, along with Trac, email notification, etc. Why mention CVSDude here? No reason other than it was in the top of the Google search result page! I do not encounter a single issue during the three years of using CVSDude, and their customer service was very responsive.

--

Next, we will go over how to best utilise the version control software for your content.

Reader Comments (Page 1 of 1)

Featured Time Waster

Graveyard Shift - zombie-busting Time Waster

With Halloween fast approaching, it's a great time to get in some practice defending your territory against zombies. In Graveyard Shift, you take aim at zombies and other creepy-crawlies, blasting them into splatters of cartoony green guts. It's a casual first-person shooter, and it's very easy to get the hang of - use the mouse to aim, click to fire. Graveyard Shift has at least 15 levels, and it might even have some secret stages I haven't unlocked yet. They key to getting good at Graveyard Shift is learning to use ...

View more Time Wasters

Featured Galleries

Defective by Design, London: Protest Pictures
Microsoft Security Essentials
Chromium Pre-Alpha on CrunchBang Linux
Safari 4 Beta
10 Firefox themes that don't suck
IE8 RC1
Download Squad at the Crunchies After-Party
Download Squad at the Crunchies
WordPress 2.7
Cooking Mama: Mama Kills Animals
Windows 7 Hands On
Comodo Internet Security
Android First-look: Amazon.com MP3 Store
Android First-look: Twitroid
Google Reader Android
Android Hands-On
Twine 1.0
Photoshop Express Beta
Mozilla Birthday Cake
Palm stuff
Adobe Lightroom 1.1

 


Follow us on Twitter!

Flickr Pool

www.flickr.com

More Tech Coverage

AOL Radio