Website Version Control


#1

For a while now, I have maintained a local copy of my sites hosted on DreamHost, and used that copy for development. When I was happy with changes, I would upload the updates to the live server.

Occasionally, updates are made directly to the live server, and I’m concerned that at some point, an error will be made and data will be lost.

I would like to store the entire site in SVN, and push the latest revision to the live server. That way, all files are under version control.

The problem is … I’m not sure how to go about setting this up.

  1. Should I create a dedicated depot in Subversion under the DreamHost panel?

  2. How does the latest revision get push from SVN or pulled down to the web server? A cron job?

  3. If a cron job should be used, are there any specific setting or commands I should use? I’ve never set one up before.

I’ve looked around the DreamHost knowledge base and searched the forums, but haven’t found anything regarding this setup. If you have a link, please post it here.

Here’s post by another developer that discusses what I’d like to do:

[hr]

Of course, right after posting … I come across the relevant information.


#2

You should consider git. It’s far superior to SVN, but it can take some time to wrap your head around its concepts. It was created by Linus himself, so it’s good, but sometimes frustratingly powerful.