Using SVN With a Staging and Live Website

前端 未结 2 420
闹比i
闹比i 2021-02-04 14:06

I currently have an svn repository on my hosted web server. I work locally, commit my changes to the repository on my server, and then run an \"svn update\" via ssh in my live

2条回答
  •  南笙
    南笙 (楼主)
    2021-02-04 14:43

    As you already identified the best way to do this is using branching and tagging. A good example of how to do this would be as follows.

    Major development

    1. You do your major development on the trunk.
    2. Whenever you release a copy of your software to live you create a tag from the trunk, and switch your website to point at the new tag.

    When you need to make a small change to live you can now do the following:

    1. Create a branch from the live tag, and do the work here.
    2. Once your happy with this change you create a new tag from this branch and switch your live working copy to the new tag.
    3. You could also merge this change from the branch into the trunk so that this change is also in your next major version.

    There is a really good fee book on subversion that explains this all in excruciating detail here:

    http://svnbook.red-bean.com/

    If you can find the time I'd strongly suggest a read.

提交回复
热议问题