SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need Help with Version Control for Websites

    Hi,

    Me and my colleagues have finally realized that we need version control on the work we do. Our usual workflow from start to finish on a website would be something like this:

    1. Design Website (local)
    2. Markup/Style Website (local)
    3. FTP CMS to production site (production)
    4. Wrap Markup/Style around CMS (production)
    5. Adding dynamic features (production)
    Repeat 5

    Pretty general. We keep basic backups of the work after every large FTP but we do not track time, changes or bugs. We progressively fix any problems and add new features. This workflow is fine and works well for us BUT its not perfect, it has happened that for example, developer_1 would be editing a css file one day and leave it open in their editor, the next day developer_2 would open the file and make a new batch of changes, when developer_1 needs to make more changes on day 3 he overwrites all the work on day 2 because he never re-downloaded the file to make updates. Its a stupid error but it sometimes it happens.

    What we want to do now is set up a version control system so that never happens again but also to improve our workflow and track changes to files, bugfixes and time spent working on development.

    So...we use subversion. Fine. We all have the basics of subversion. Checking out, commiting, updating etc. What we need to know is the optimal situation for deploying to our production server without overwriting changes or too much hassle.

    My idea at the moment would be to set up a live development server, dev.domain.com, with a working copy, set up an account for the 3 members of our team, that way we can sync with the production database if we want to and test without having to commit to the the production server after each change for testing, when we're ready then, using springloops or beanstalkapp, use the easy deployment feature to update the production server with the latest revision.

    However, I could see problems with this method if one developer commits at the same time as another, seeing as we are using the same working copy.

    The new workflow would be:

    1. Design Website (local)
    2. Markup/Style Website (local)
    3. Add CMS to dev site working copy (staging)
    4. Wrap Markup/Style around CMS in working copy (staging)
    5. Commit changes to the main repository until site is finished (staging)
    6. Commit latest revision to production site (production)
    Repeat 5 & 6

    I wonder am I looking at this assways or am I on to something, the main goal being to easily adopt version control for websites without too much extra addition to our workflow.

    Can anybody see anywhere that issues could arise? Config files can be ignored/not version controlled.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Have each member check out their own local copy.

    You can check out a working copy on a development/staging server if you want still, and "svn update" over there to do whatever kind of testing they can't do on their local machines.

    But any changes should be made on their local copies and committed under their own names, or you lose most of the benefit of using version control in the first place.

  3. #3
    SitePoint Zealot
    Join Date
    May 2005
    Posts
    172
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Have each member check out their own local copy.

    But any changes should be made on their local copies and committed under their own names, or you lose most of the benefit of using version control in the first place.
    Changes will still be tracked by the account, we've started using Springloops as our SVN host, each person in the team gets an account. When they checkout the main repo they do so with their own username/password and changes are then mapped to their username.

    Quote Originally Posted by Dan Grossman View Post
    You can check out a working copy on a development/staging server if you want still, and "svn update" over there to do whatever kind of testing they can't do on their local machines.
    How do you set up svn on a dev server?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spudz
    Changes will still be tracked by the account
    Not if they make changes in the working copy on the dev server. I assumed that's what you meant when you talked about two people committing at the same time. That's not possible with separate working copies, you can't commit if your copy isn't at the latest revision already.

    Quote Originally Posted by spudz View Post
    How do you set up svn on a dev server?
    Same as you do on your local PC, check out a working copy (svn checkout). Or 'deploy' it there.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •