0
What is the common branching pattern in Git?

Open 1 Answers 38 Views Technology

What is the common branching pattern in Git?

1 Answer

0

The common branching pattern is based on the git-flow. It has two main branches i.e. master and development.

  • The master branch contains the production code. All the development code is merged into the master branch at some point in time.
  • The development branch contains the pre-production code. When the features are completed, they get merged to the master branch, generally through a CI/CD pipeline.

This model also has some supporting branches that are utilized during the development cycle:

  • Feature Branches/Topic Branches: They are used to develop new features for upcoming releases. It may branch off from the develop branch and must be merged back into the develop branch. Generally, these branches exist only in developer repositories, and not in origin.
  • Hotfix Branches: They are used for unplanned production release when there is a need to fix any critical bug immediately in the live prod version. They may branch off from master and must be merged back into develop and master.
  • Release Branches: They are used for the preparation of new production release. The release branch lets you do minor bug fixes and prepare metadata for release. They may branch off from development and must be merged back into master and develop.
by (274k points)
...