I have been using Subversion (svn) as my version control system for a while now. I have had no problems with it and would recommend it to anyone considering implementing their own version control system. If you are unfamiliar with what a version control system is, check out the following passage from the Subversion eBook:

Subversion is a free/open-source version control system. That is, Subversion manages files and directories over time. A tree of files is placed into a central repository. The repository is much like an ordinary file server, except that it remembers every change ever made to your files and directories. This allows you to recover older versions of your data, or examine the history of how your data changed. In this regard, many people think of a version control system as a sort of “time machine”.

Before getting started with svn, you really should read the free eBook I mentioned earlier http://svnbook.red-bean.com. It is free and will save you time and frustration. Well, lets get started.

#first you need to install svn
apt-get install subversion

#as root create a special user account just for svn
adduser svn

#as root make a new directory
mkdir svn /usr/local/svn

#switch to your svn user
su svn

#create a svn repository
svnadmin create /usr/local/svn/your_project_name

#change the config file located at /usr/local/svn/your_project_name/conf/svnserve.conf
#to match your desired security settings.
#create passwd file for svn in the same folder as svnserve.conf. follow the instructions in svnserve.conf.

#start the svn server daemon. it will listen for svn requests.
svnserve -d -r /usr/local/svn

Foward port 3690 on your router to your svn server computer if you would like to access it over the Internet.

Windows users have an excellent, free, GUI svn client called TortiseSVN. You will have to “checkout” a project in order to begin using it. The url will be something like svn://your_url_OR_ip address/your_project_name. Linux has a number of svn clients (including the good old command line)

Now that you can access your project you can add, edit, delete, rename, directories and files just like normal. if you make modifications you wish to keep don’t forget to “commit” your changes. You can place multiple projects in a single svn repository or make a new repository for each project. the choice is yours, just remember version numbers act at the repository level. Keep in mind, all projects in a repository have the same version number.

Most projects use three directories to organize a project: tags, branches, and trunk. For an explanation please refer to the eBook.