General branching strategy for enterprise development projects:

  • The main branch master
  • Development Branch Develop
  • Function branch feature
  • Pre-release branch release
  • Bug branch fixbug
  • Other Branches

1). Master branch

The code base should have one and only one main branch. All official releases for user use are published on this main branch.

The name of the Master Git branch, which is called Master by default. It is built automatically, and once the repository is initialized, development is done in the main branch by default.

2). Develop branch

The main branch should only be used to distribute major releases, and daily development should be done on the other branch. We call the development branch, Develop.

This branch can be used to generate the latest code version of the code. If you want to formally publish, merge the Develop branch on the Master branch.

3). Function branch feature

The Develop branch, which is developed from the Develop branch to Develop a specific feature. Once the development is complete, it is incorporated into Develop.

The name of a feature branch can be named as feature-*.

4). Pre-release branch release

Pre-release branch, which means we may need to have a pre-release version to test before we release the official version (i.e. before merging into the Master branch). The pre-release branch is separated from the Develop branch and must be merged into the Develop and Master branches after pre-release. It can be named release- star.

5). Branch fixbug bug

Bug branch. After the software is released, it is inevitable that there will be bugs. This is where you need to create a branch to fix the bug. The branch is separated from the Master branch. After the patch is complete, merge into the Master and Develop branches. It can be named in the form fixbug-*.

6)

There are other branches that you can create as needed…