ZuoPengFei 2017.8.27

A, gitflow

  • 1. Gitflow defines a strict branching model around project releases
  • 2. Gitflow still uses the central repository as the interaction hub for all developers.

Gitflow schematic

What branches does Gitflow include

  • Master: indicates the master branch of the maseter, which stores the history of official releases. It’s released with a tag, which is the version number
  • Hotfix: debug branch, bug urgent repair branch
  • Release: release branch, used when a release goes live
  • Develop as a collection of features
  • Feature: Feature branch. Every time a new feature is developed, there will be corresponding feature branch and several different feature branches at the same time

Four, the difference between historical branch and functional branch

Branch of history

Instead of just one master branch, the Gitflow workflow uses two branches to record the history of the project. The Master branch stores the official release history, while the Develop branch acts as the integration branch for functionality. This also makes it easier for all commits on the Master branch to be assigned a version number.

The basic concept

Each new function is located in its own branch, which can be pushed to a central repository for backup and collaboration. But instead of pulling a new branch from the Master branch, the functional branch uses the Develop branch as its parent. When the new functionality is complete, merge back into the Develop branch. New feature submissions should never interact directly with the Master branch. The feature branch is typed from Develop.

The working process

  • Use the Develop branch as the parent,
  • Each new feature is in its own branch
  • Once the new functionality is complete, merge it back into the Develop branch.

Release branch

When you need a Release branch

When the code on the Develop branch contains all of the software functionality planned for the upcoming release and has passed all of the tests, it is time to consider creating the Release branch. All business requirements outside of the current upcoming release must be made sure that they are not mixed into the Release branch (so as not to introduce uncontrollable system defects).

After the release of

Once the Release branch is successfully derived and given a version number, the Develop branch is ready to serve the “next version.” A “next release” is a release that follows the current upcoming release. The version number can be named according to the version number naming rules defined by the project.