Branches in a GitHub Flow strategy
A GitHub Flow branching strategy commonly has the following branches.

feature branch
You develop features in feature
branches. To create a
feature
branch, you branch off of the main
branch.
Developers iterate, commit, and test the code in the feature
branch. When a feature is complete, the developer promotes the feature by
creating a merge request to main
.
Naming convention: |
|
Naming convention example: |
|
bugfix branch
The bugfix
branch is used to fix issues. These branches are
branched off of the main
branch. After the bugfix is tested in
sandbox or any of the lower environments, it can be promoted to higher
environments by merging it to main
through a merge request. This is
a suggested naming convention for organization and tracking, this process could
also be managed using a feature branch.
Naming convention: |
|
Naming convention example: |
|
hotfix branch
The hotfix
branch is used to resolve high impact critical issues
with minimal delay between the development staff and the code deployed in
production. These branches are branched off of the main
branch.
After the hotfix is tested in sandbox or any of the lower environments, it can
be promoted to higher environments by merging it to main
through a
merge request. This is a suggested naming convention for organization and
tracking, this process could also be managed using a feature branch.
Naming convention: |
|
Naming convention example: |
|
main branch
The main
branch always represents the code that is running in
production. Code is merged into the main
branch from
feature
branches by using merge requests. To protect against
deletion and to prevent developers from pushing code directly to
main
, enable branch protection for the main
branch.
Naming convention: |
|