skip to main content

TAMU Webmaster's Blog

Information and insight from the A&M Webmasters

Version Control with Subversion

May 19th, 2008 by Erick Beck

After being in this office for a year, we crossed a milestone last week — all of the sites we maintain are now under version control using Subversion (SVN.) I had been familiar with its use by hard core programmers to allow for code sharing and versioning, but I had only dabbled with it for managing web sites. Boy was I ever missing out, I couldn’t live without SVN anymore.

We maintain a development/staging server that mirrors the production machine in terms of hardware and software setup. This allows us to do all of our work on the dev server, see what it is going to look like, and make whatever changes we want before the public sees any of it. It is then a simple process (yes, the syntax is quite straightforward and easy to learn) of checking the code into SVN and then going over to the production machine and checking it back out.

This might seem all well and good, but necessary? I never thought so until I started making changes on 20-30 files at once, all in vastly different paths in the site. Trying to ssh that many changes over to the production server was an open invitation to messing up a filename or a path somewhere. And with some of our sites copying the entire site just to catch those 20 edited files would be overkill. No more…SVN will automatically recognize all of your incremental changes and pull down only the files that need updating.

Subversion also works wonderfully in the development environment. It allows you to store multiple versions of your code, so if you decide to explore a different methodology and then later have to back out, it is as easy as checking out the previously stored version and you’re back where you started. No more clutter of dozens of .bak files, no more having to rewrite code because you thought you wouldn’t need it again – it’s all safely ticked away inside the repository.

I realize in the long run content management will solve these same issues, but until then I highly encourage you to take a look at how SVN can make your job easier as it did with ours.

Monday, May 19th, 2008 Miscellaneous,
Share this article

1 Comment to Version Control with Subversion

  1. Eric – Another Aggie web geek here! I’ve known about (and heavily used) Subversion for a while now, and wrote up an article a long time ago on best practices when used with websites and webapps. It’s a bit more technical but covers some of the same benefits. Hope someone finds it helpful!

  2. Karl Katzke on May 19th, 2008

Leave a comment