Advice on multiple release lines and git-flow, for git non-gurus

你离开我真会死。 提交于 2019-11-29 19:51:55

we are having a similar setup except we have more than 300 dedicated developers, we have exactly what you described several revision we need to deliver to different customers.

We have divided it so we have an initial ref like refs/heads/platformX.Y/ then we build on that

So depending on what you need to do you checkout platformX.Y/develop and start working from that point on a feature branch and you merge back to develop when you are done.

This works for us and we can follow the nvie model.

on top of everything we are merging all these platformX.Y branch to our main develop branch so errors corrected on those branches are released in to the latest software as well.

Our usual development process fits Driessen's flow workflow well, but we sometimes need to develop a branch with several features for a specialized release, where we don't want the bulk of ongoing development included. We've found a way to do this within flow using existing tools, with just a couple of extra steps. (We are working in mercurial, but the options to git flow and hg flow are the same.)

For example, our next normal release is 23.0, and our special, "sandboxed" release is 22.4.2. For these cases, we:

  1. Early on, before the new features are created, create a release branch 22.4.2 for the special release off of develop. It's fine if some features were started earlier as long as they don't come after any work on develop that we want to exclude.
  2. Make a tag there for convenience (start-22.4.2)
  3. Start each new 22.4.2 feature with start-22.4.2 (a changeset on develop) as it's parent/base. This prevents any work merged to develop in the meantime from leaking onto the release branch. Both the commandline and Sourcetree support choosing a parent besides the tip for git flow feature start.
  4. Merge manually from the tip of the 22.4.2 branch to the feature, if desired, and as often as desired, to bring in any completed features from the branch. This lets us deal with any interactions of concern among the new 22.4.2 features on the branch.
  5. git flow feature finish the feature, which merges it to develop as normal. (For us, these features are meant to be included in future releases. We're only protecting 22.4.2 from less-tested work.)
  6. After finish, we manually merge the last changeset before the close of the feature onto the 22.4.2 branch.

One solution is to change the config variable gitflow.branch.develop. You create a branche at your released version and use that branch as your new develop branch. From there, you use the usual git-flow commands. If you want to automatically merge that work back into the original develop branch, change the gitflow.branch.develop variable before the git-flow finish command.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!