Git usage and code management

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.