views:

302

answers:

2

I'd like to hear how other web developers manage their websites over the life of the project. For example I have several sites I've been developing for several years where a "version" could be a completely separate code base. So version 1.0 might be straight html and version 2.0 might be a symfony app.

There is also the issue of those pesky databases and project files that should not be pushed to a production server but I would like to keep altogether (ex: layout PSD's). The database files for non-symfony apps I've been dumping into a directory within the project and including that in version control.

Thank you.

+2  A: 

If your versions really are that different then I would consider them to be completely separate projects, though probably within the same repository, in terms of source control.

For promoting a copy of a site from source control to a live system I would create a simple script that gets the correct version of the project from source control, removing any extra files that are not needed, then transfer the result to the site. This gets more complicated, of course, if your application modified files within the directory containing the html/script files as you need to be careful not to blitz needed changes made via the app when you apply the new version.

For databases I keep the build scripts (needed to create a new database) and upgrade scripts (needed to morph an existing database from one version to another) in source control. Populated databases I keep backed up elsewhere (or they are the client's responsibility if the DB does not contain my data).

David Spillett
A: 

you can create a new branch for your newer version of website, and that will keep the original repository intact.

Tumbleweed