When using Git to manage code, branch management policies need to be standardized across development. Common branch management strategies include TBD, Github flow, and Git flow. For the above strategies, this article will not repeat, interested students can refer to this article. Git branch management best practices

TBD, for the moment. Github Flow has only different feature branches because there is no unified development branch. When multiple people develop multiple requirements, feature branches and features are easy to cover each other when releasing test servers. With git-flow, the feature branch is merged into the Develop branch, and the next release will be released when the requirements are merged into the Develop branch. It is suitable for development teams with long release iteration cycles and clear release requirements. However, our team may not be suitable for the situation of short demand cycle, variable development content, and parallel development of multiple requirements by multiple people. Therefore, we made some changes to Github Flow to develop and standardize a more flexible branch management strategy.

The diagram is divided into three branches. As with Github Flows, the master branch serves to provide a stable code base. No developer is allowed to submit untested or unreviewed code directly to the Master branch. The Develop branch is used to merge functionality under development for testing. When a new feature or bug is found, we cut out a branch from Master, modify the code and merge the branch into Develop for testing. If the test fails, the feature or bug branch is returned for modification until the test passes, and the feature branch is merged into the master branch through Merge Request for release. In this way, different feature branches in Github Flow can overwrite each other, and git-flow functions cannot be released independently temporarily.

Of course, the above branch strategy has its problems, such as frequent branch switching. It would be much easier to have a plug-in tool like Git-flow.

Branch management strategy is a matter of opinion, there is no absolute best, only the best for your team. The above.