Configuration 101: Using Subversion for Change Management
So, what to do?
- Find a reliable space to store your repository, which is essentially the authoritative copy of your files. This space needs to be reliable, and should be easy to back up. Subversion (and most other RCS systems) will work with a variety of access types, but primarily I find direct filesystem access over NFS and remote access via SSH to be the most common use cases*. For the purpose of this discussion, we'll call it /export/svn/foo
- Install subversion on the chosen system. Most *nix systems will have a subversion package; if not, there's a link to their website at the top of this post.
- Run svnadmin to initialize the repository. 'svnadmin help create' will give you some info on the options available to you, but generally 'svnadmin create /export/svn/foo' is the form of command you want here.
- Install subversion on your client system; soon I'll be posting information on good Windows-based clients for subversion, but right now I'm going to punt on that and assume we're using *nix.
- Check out a working copy of your empty repository:
cd ~
mkdir svn
svn co file:///export/svn/foo ~/svn/foo
-- or over ssh to a server called myhost.com --
svn co svn+ssh:///export/svn/foo ~/svn/foo - Copy files into the working copy, or start creating new files.
- Add the files into SVN, using svn add
... - Commit your changes back to the original repository, using svn commit -m "Log Message Goes Here" ~/svn/foo/
Obviously, there's a lot more to managing source files, but this is a start. Note that if you're using SSH to connect to a remote repository, SSH keys will save you a lot of typing!
* If you've ever used a code.google.com project, you may have noticed that they use SVN. If you have commit access, you'll use authentication over HTTPS to do commits. SVN is capable of storing your password in your working copy in this case, but it's beyond the scope of this particular post; go forth and Google it!

