How to best implement Version Control for Web Development?

Posted by Adam Taylor on Stack Overflow See other posts from Stack Overflow or by Adam Taylor
Published on 2009-09-02T15:50:20Z Indexed on 2010/03/29 2:23 UTC
Read the original article Hit count: 482

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.

With that in mind, I have looked around and discovered a few different methods of using version control in web development projects:

  1. 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.

  2. 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.

  3. 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).

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).

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.

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.

How have the users of stackoverflow used version control with web development projects and which method/workflow was most effective.

Please also include extra methods I haven't thought of / read about.

© Stack Overflow or respective owner

Related posts about version-control

Related posts about scm