August 11th, 2008
From a discussion on reddit.com.
A modern version control system has three clear benefits over the “folder backup” method.
- File space. Let’s say your code changes 10% each week. Under the “folder backup” method, each week you’re saving 100% of the code. Using a proper VCS, you’re only saving 10% of your code. I know hard drive space is cheap, but it’s not free and I never seem to have enough.
- History. The key to VCS, in my opinion, is being able to document your changes in more granular level than a file called “Changelog.txt” that might not get changed whenever you work on your code.
- Bug-location: Let’s say you find a bug in a method. You search the history for that file and let the VCS runs the diffs for you.
- Complete freedom to change code. You don’t have to worry about breaking something, or removing possibly useful code. Before I moved to VCS, I used to comment out old code liberally but keep it ‘cos I might need it. This quickly becomes a PITA.
That being said, I’ve got some caveats too.
- You’re still going to want to backup the version control folder
- You’re entrusting your entire code base to a program that may itself be buggy. You’re going to want to make sure (a) it’s reliable (no bleeding edge releases) and (b) you understand how to work it
GIT seems to be very popular.
Article on How to set up a personal home Subversion server.