Managing hotfixes when develop branch is very different from master?

前端 未结 4 893
春和景丽
春和景丽 2020-12-07 10:19

I\'m using the \"Git Flow\" branching model, with a master branch and a develop branch. I\'m working on a major new release, so my develop branch is wildly different from my

4条回答
  •  我在风中等你
    2020-12-07 10:33

    This all depends on how you are going to use GIT to manage your code, your release plan, and your version. The best practise is to have master branch to hold your production level code, have develop branch to do your development, have release branch branched out from develop to handle your upcoming releases and hotfix branch branched from master to handle urgent fixes for production code. So the release and hotfix branches will finally to be merged back to BOTH master and develop to make sure both branches have the changes and later on when develop branches out new release this new release has no problem to merge on master. And the tagging will be always on master.

    With this approach, the release and hotfix branches will be merged twice and the conflict is sometimes seen when merging to develop, which is inevitable if there are many development activities going on develop. Shorten your release or hotfix branch lifecycle could be a way to mitigate this problem. If conflict happens, solve it with whatever techniques and make sure don't change the completed and tested release or hotfix code.

提交回复
热议问题