Skip to main content
  1. Posts/

Branch Naming Convention

·205 words·1 min· ·
Xianpeng Shen
Author
Xianpeng Shen
Table of Contents

Why need branching naming convention
#

To better manage the branches on Git(I sued Bitbucket), integration with CI tool, Artifactory, and automation will be more simple and clear.

For example, good unified partition naming can help the team easily find and integrate without special processing. Therefore, you should unify the partition naming rules for all repositories.

Branches naming convention
#

main branch naming
#

In general, the main’s branch names most like master or main.

Development branch naming
#

I would name my development branch just called develop.

Bugfix and feature branches naming
#

For Bitbucket, it has default types of branches for use, like bugfix/, feature/. So my bugfix, feature combine with the Jira key together, such as bugfix/ABC-1234 or feature/ABC-2345.

Hotfix and release branches naming
#

For hotfix and release, my naming convention always like release/1.1.0, hotfix/1.1.0.HF1.

Other branches
#

Maybe your Jira task ticket you don’t want to make it in bugfix or feature, you can name it to start with task, so the branch name is task/ABC-3456.

If you have to provide diagnostic build to custom, you can name your branch diag/ABC-5678.

Summary
#

Anyway, having a unified branch naming convention is very important for implement CI/CD and your whole team.

Related

These settings in Bitbucket/GitHub recommends enable
·282 words·2 mins
Provides a list of recommended settings for Bitbucket and GitHub repositories, including enabling force push rejection, branch protection, tag management, merge checks, and commit message standards.
git sparse-checkout enable and disable
·127 words·1 min
This article explains how to enable and disable git sparse-checkout, including examples of how to configure sparse-checkout for specific directories and how to reset it.
Programmer's Self-Cultivation — Git Commit Message and Branch Creation Conventions
·1643 words·4 mins
This article introduces how to formulate and implement Git commit message and branch creation conventions to improve code quality and team collaboration efficiency.
How to Slim Down Your Git Repository
·1133 words·6 mins
How to remove unnecessary files and history from a Git repository to reduce its size, providing two methods using BFG Repo Cleaner or git filter-branch.
Git History Statistics Generator
·712 words·4 mins
GitStats, a Git history statistics generation tool written in Python, can generate detailed code submission statistical reports to help developers analyze project activity and contributor information.
Resolving the "Could not read from remote repository" Issue
·597 words·3 mins
Resolving the “Could not read from remote repository” error encountered when cloning code using Git, analyzing the causes, and providing solutions.