Branch type:
Main branch: Master, Develop, release Functional branch: Hotfix, feature(added according to actual project needs)
Branch policy rules:
Only the master branch undertakes publishing tasks and appends the tag (release date) after each publishing. After the release/ Hotfix branch test is completed and the code is sealed, merge and grayscale regression are carried out before production line release. Develop and Release as continuous integration branches. Initialization/creation/merge operations must be performed by the technical manager.
Code submission rules:
Everyone commits at least once a day to the main branch (Develop, Release), unless no new features are developed or bugs are fixed. Every commit triggers an automatic code walk, UT, IT, etc. Every time there is an error at any step, the integration problem is resolved first
Version naming rules:
Release naming format: "release_1.0.0_YYDDmmHotfix naming format:Hotfix_1. 0.1 _yyddmm"Copy the code
Branch types:
The main branch:
The central code base always maintains three main branches
The master undertakes release tasks and tracks the latest production line release record (TAG). Work on bug fixes for the current iteration while developing releaseCopy the code
Function branch
Hotfix branch Feature branchCopy the code
Used to help team members process development tasks in parallel, such as tracking each feature, preparing for release, and quickly fixing online problems. These branches have a finite lifetime and will eventually be removed (optional). Each branch has a specific purpose and has strict rules, such as the starting branch, the merged target branch, and so on.
Release branch: Used to support requirements testing in general development iterations
*.*mmyydd Update-version dependency This branch only allows code that fixes a defect to be submitted for testing and merged into all dynamic branches after it has been sealed.
Hotfix branch: Used to support emergency requirements, production line defect fixes and production environment releases
Create from: master branch naming convention: Hotfix 1.0.* mmyyDD (master branch recently released tag 3 +1) Update version dependency (consistent with hotfix version) This branch only allows code with urgent requirements or production defects to be submitted after testing is completed and consolidated to all dynamic branches except it: Develop /master (Tag) /release (optional) Delete branches after merge
If a release branch already exists at this point, hotfix changes need to be merged into the Release branch, not the Develop branch. Because bug fixes are merged back into the Release branch, which is eventually merged into the Develop branch after the release branch is published. If you need a fix immediately in the Develop branch and can’t wait for the Release branch to merge back, you can merge back into the Develop branch.
Feature branch (optional) : Used to support multi-iteration parallel development
*.* The Mmyydd Feature branch is used to develop new features, including upcoming or future releases. The Feature branch life cycle stays in sync with the development cycle of new features, but is eventually merged back into Develop or discarded. Feature branches usually only exist in the developer’s code base and do not appear in Origin, unless there are more than two versions of development in parallel for a long time.
Branch strategy reference:
a-successful-git-branching-model