One thing that still amazes me about the majority of developers I meet, is that they either don’t use source control or (even worse) are still using Microsoft Visual SourceSafe on their projects! (Read about why SourceSafe is a BAD source control system here and here.)
Whether it be on private work or projects at their place of employ, they are of the idea that source code corruption or even total loss will never happen to them. Backups? Who needs backups?
On one of the recent projects I’ve been working on, we were originally going to use Microsoft Team Foundation Server (TFS) as our source control system. TFS is an excellent source control system from Microsoft, but comes with a hefty price tag, making it only accessible to corporates with deep pockets. Of course, TFS offers much more than just source control, it also offers work item tracking, bug tracking and project methodology templates, such as the Microsoft Solution Framework (MSF) for Agile Software Development, MSF for CMMI Process Improvement and more.
Our only reason for not using TFS on this project was red tape. To get the company to open up their firewall and port forward all traffic for TFS over the web would involve weeks, if not months of bureaucracy to get what we needed. You may have picked up by now that we were working off-site from the client’s offices, yet they wanted to be in control of the source code.
After looking at a couple of options, we found a technology called Subversion (SVN), an open source version control system. It offers versioning of files and directories, branching and merging and atomic commits, so no half check-ins. Oh, and it’s free.
As with most version control systems, it’s based on a client-server architecture. You need a source control server which will manage user access & repositories, and source control clients pushing and pulling content to and from the server.
VisualSVN Server is a free Subversion server for Windows and it’s totally self-contained. It comes with a light version of Apache which allows it to accept connections over standard HTTP(S). It’s as simple as downloading it, installing it, setting up a repository and users, and you’re good to go.
VisualSVN also offer a Visual Studio plug-in that allows you to interface with the VisualSVN server directly in your IDE, but this plug-in is not free. However, CollabNet Corporation, offer AnkhSVN, a free Visual Studio plug-in that can interface with any SVN server. It has all the features you’ve grown accustomed to by SourceSafe and TFS, such as Get Latest Version, Check-In and most of all the other features you’ve come to use in your every day development.
You can also use a program called TortoiseSVN which integrates directly into Windows Explorer, allowing you to get latest version and such from outside the IDE. TortoiseSVN offers some great tools in its feature set, like file comparison and merging tools, essential for when you’re working in a large team and changes have occurred to files while you were working on them.
Personally, I run both TortoiseSVN and AnkhSVN as sometimes I need to inspect the repository to see who commited what changes, and I don’t necessarily need to load my Visual Studio IDE in order to do that.
If you don’t have a server to install VisualSVN server on, or you’re apprehensive to running a server application on your desktop or laptop, you can always use one of the very many free source code hosting solutions out on the web. www.xp-dev.com and www.projectlocker.com are just 2 examples that provide excellent service, for free or for a small fee, the latter obviously giving you more of an offering.
I hope this post will provide some motivation for you to start using a good source control system. Good code is a valuable commodity, don’t risk losing it.