There are some problems with branch management and Git on the project.
Advantages and disadvantages of multiple branch:
Advantages: Easy to team cooperation, easy to function development, easy release, development without frequent branch, conflict, less testing.
Disadvantage: High management cost + High Maintenance Cost: Submit + merge + verify, Fixbug.
Because of the Internet Project iteration Fast, branch maintenance management is particularly frequent, these realities. The phenomenon is branch, high management costs (A), often requires 7 teams to centralize the code in sequence, and each group is assigned a person (B), and the conflict is particularly numerous (C). View history is always correct for authors who are not modified (D).
The problem behind these problems is git use, branch management.
A problem: branch line too much, branch maintenance tired, merger, test tired. Because each group is itself out of the test package, there can be 1-3 features. The workaround is to use a unified dev development line, feature development self-test to merge to the Dev line.
B problem: Because of the deadline of development, the reason for merging in order is that a large number of merges are used, causing the code commit to be forward dependent and prone to conflict. This person is not necessarily a feature developer, it is difficult to ensure that there is no problem.
The solution is: feature development, by the developer himself rebase to the Dev line, time is deadline before, because commits are forward-dependent, incremental development should not conflict.
C Problem: Because of the large use of merge before, the three-party merge causes the commit to be a tripartite merge with no explicit forward dependencies. All the people behind are forced to use rebase.
D: Merge the previous code, and the new merge commit automatically added the current author.
Branch Management Ideas:
Master Main Line for relase stabilization line: HotPatch Patch Branch submit verification pass, hit this line. At the same time automatically cherry-pick to the development line.
Devbranch All Modules Development line: Feature development self-test completed, rebase to this line, test verification, in this CI, AUTOTEST
Feature Branch: Develop new functional line, Codereview, self-test is done on this line.
Attach the new branch plan and Git day often using the command usage method.
Git usage and code management