What branching strategy should I use during the development/maintenance of a web application?

前端 未结 5 1979
情书的邮戳
情书的邮戳 2020-12-13 21:56

I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments an

5条回答
  •  暖寄归人
    2020-12-13 22:32

    I tend to use Git for my projects, but the process I tend to follow goes like this (and should work for Subversion as well):

    • for each new feature, create a branch for that feature.
    • When everything works, merge it into the staging branch, and deploy it to the staging server (you do have one of those, right?)
    • Once we're sure the client is happy with what's on staging, we merge the staging branch into the production branch, tag it as something like production_release_22 or production_release_new_feature_x, and then deploy that tag to the production server.

    Tags are never, ever updated - once something gets deployed, it stays that way until more changes are built, tested, and tagged - and then the new tag is deployed. By making sure that it's tags getting deployed and not branches, I keep myself (or others) from doing things like "I'll just commit this one quick change and update the server without testing it".

    It's worked pretty well for me so far.

提交回复
热议问题