Feature and hotfix branches for git best practices

  Let's review a wave first, git's best branch management process:

  Then briefly review each branch:

  • master: The main branch, mainly used for version release.
  • develop: The daily development branch, which normally saves the latest development code.
  • feature: A specific feature development branch, which only interacts with the develop branch.
  • release: The release branch can be thought of as an untested version of the master branch. For example, if all the functions of a certain phase are developed, then the develop branch will be merged into the release branch, and there is no problem in testing, and when the release date is reached, it will be merged into the master branch for release.
  • hotfix: Online bug fix branch.

  First, the general process of the enterprise is introduced, which is the issue of version release (assuming V3R2) and developing a new version (assuming the new version is V3R3). Is the version under development that needs to be released in the future. So why develop a new version? Because software needs to evolve and adapt to changes and needs, the software metaphor V3R2 released after a period of iterations will continue to expose problems, and such problems also need to become available in the new version. Because V3R3 are all new features and new changes

  feature:
  only interact with develop, because feature is what new version development needs to use for upgrade and evolution, all code in it can only be integrated into master when a new version is released and tested, and then tag on master to indicate all new features After the development is completed, it is merged at one time. At the same time, we generally develop different functions by different people, so each of them should have their own features, and then develop intermittently. Therefore, ensure that develop is a version with continuous integration of new functions.

  hotfix:

  This branch is used to fix the BUG of the mainline master, but it should be noted that in the old version of the BUG, ​​the new version also exists, so the develop branch also has the BUG, ​​specifically, V3R2 and V3R3 both have the BUG, ​​therefore, When repairing, you must submit two branches, master and develop. Otherwise, it will be troublesome to rebase later.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324611737&siteId=291194637