title: How to best implement Version Control for Web Development?
body: <p>Version control systems are obviously important in development projects but there use in web development projects appears to be more complex, what with the requirement of having a web server to run all but the simplest of web applications.</p>
  
  <p>With that in mind, I have looked around and discovered a few different methods of using version control in web development projects:</p>
  
  <ol>
  <li><p>Provide each developer with a virtual machine which is a replication of the development server and have the developer run their working copy of the application in the virtual machine.</p></li>
  <li><p>Have each developer use a sub domain on the development server, e.g. john.project.com and checkout their working copy of the app to the directories the sub domain points to.</p></li>
  <li><p>Use the version control system to checkout code, make a change, commit the code and then check it on the development server (which points to the head of the repository).</p></li>
  </ol>
  
  <p>I can see a drawback of 1 being the added time required to create the virtual machines and ensure that the virtual machines are kept insync with the development server (also the need(?) to continuously change the developers host file to point at the virtual machine not the development server).</p>
  
  <p>I can see 2 possibly being a problem if absolute URLs are used within the site unless there is an easy way to update the configuration to use the new subdomains as well.</p>
  
  <p>3 is the easiest to set up but is rather primitive and it will presumably become quite tedious for a developer to keep checking in the code after every time change. </p>
  
  <p>How have the users of stackoverflow used version control with web development projects and which method/workflow was most effective.  </p>
  
  <p>Please also include extra methods I haven't thought of / read about.</p>