<p>What's are the best practices for versioning web sites?</p>

<ul>
<li>Which revision control systems are well suited for such a job?</li>
<li>What special-purpose tools exist?</li>
<li>What other questions should I be asking?</li>
</ul>

[{'answer_id': 37132, 'author': 'Murph', 'author_id': 1070, 'author_profile': 'https://Stackoverflow.com/users/1070', 'pm_score': 4, 'selected': True, 'text': '<p>Firstly you can - and should - use a revision control system, most will handle binary files although unlike text files you can\'t merge two different set of changes so you may want to set the system up to lock these files whilst they are being changed (assuming that that\'s not the default mode of operation for you rcs in the first place).</p>\n\n<p>Where things get a bit more interesting for Websites is managing those files that are required for the site but don\'t actually form part of the site - the most obvious example being something like .psd files from which web graphics are produced but which don\'t get deployed.</p>\n\n<p>We therefore have a tree for each site which has two folders: assets and site. Assets are things that aren\'t in the site, and site is - well the site. </p>\n\n<p>What you have to watch with this is that designers tend to have their own "systems" for "versioning" graphic files (count the layers in the PSD). You don\'t need necessarily to stop them doing this but you do need to ensure that they commit each change too.</p>\n\n<p>Other questions? </p>\n\n<p>Deployment. We\'re still working on this one (-: But we\'re getting better (I\'m happier now with what we do!)</p>\n\n<p>Murph</p>\n'}, {'answer_id': 37147, 'author': 'Christian Lescuyer', 'author_id': 341, 'author_profile': 'https://Stackoverflow.com/users/341', 'pm_score': 2, 'selected': False, 'text': '<p>I use <a href="http://svnbook.red-bean.com/" rel="nofollow noreferrer">Subversion</a>.\nAs an easy way to reference the website version (production, testing, development), I use a very simple trick. I add the revision number somewhere on the site (eg in the admin footer). Something like this:</p>\n\n<pre><code>&lt;?php print("$Revision: 1 $"); ?&gt;\n</code></pre>\n\n<p>Each time you checkout (development versions) or export (for production), the "1" will be replaced by the revision number in your repository, thus making it easy to setup the customer version on your test server, for example.</p>\n'}, {'answer_id': 37256, 'author': 'Bob Somers', 'author_id': 1384, 'author_profile': 'https://Stackoverflow.com/users/1384', 'pm_score': 2, 'selected': False, 'text': '<p>In response to Christian Lescuyer\'s post, you also need to enable the "svn:keywords" property on the file with that line in it. Subversion won\'t bother looking in your files for keywords like $Revision$ unless that property is set.</p>\n\n<p>Also, if using PHP like in his example, you may want to put $Revision$ inside a single-quoted string instead of a double quoted string to prevent PHP from trying to parse $Revision as a PHP variable and throwing a warning. :)</p>\n'}]
['https://Stackoverflow.com/questions/37104', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/116/']