This article is meant for the programmers and web designers among my friends. If you're not one of those, read it anyway.
In this article, I will attempt to explain why using a source control system is a good idea and why you should start using one.
Have you ever worked on a website or a program and told yourself, Self, I'd really like the version back from last Tuesday. You know, the one that actually worked.
And if you're lucky (or paranoid) you made a copy back then that almost but not quite has the version you need.
A source control system really shines when you're working on something from more than one location or with more than one person.
A source control system can help with that. With that, you get a source repository, a big box where you can check out files or get a working copy from. You do your work on these copies and when you're done you check in files or commit your changes back into the repository.
Big deal!
, I hear you say. I can get the same by making a backup copy myself every time I make a change.
Indeed. However, a source control system will make those backup copies for you automatically. And actually, it doesn't make a copy. It merely figures out the difference between the previous version and the new one, and stores just that. So using a source control system can save you disk space, too.
And if you do make a backup (and you are making backups, right?), you simply make a backup of the entire repository, saving your project including any and all revisions you made to it.
A source control system really shines when you're working on something from more than one location or with more than one person, since it solves the lock/merge problem. Consider the situation where two people make a copy of a web page, make some changes and then put their copy back on a web server: the person that puts their copy back last will overwrite the changes of the first person, destroying their work.
A simple solution is to use some sort of lock. As long as someone, somewhere is working on a file, nobody else should make a copy. Of course, you end up with somebody holding all the locks and everybody else twiddling their thumbs.
A source control system will let two people make a copy of the same file, let them change it and when they put it back into the repository, it will automatically merge the changes, creating a file that contains both changes.
So, a source control system gives you backups, an easy way to retrieve those, and the ability to work from more than one location or with more than one person without stomping all over earlier changes. All that automatically, while saving disk space because it only stores changes.
Convinced? Excellent. In a next article, I'll explain how to set up your own source control system. It's surprisingly easy.