CurriculumBranching & MergingBranch Naming Strategies
Lesson 5 of 5100%
Beginner5 min+50 XP

Branch Naming Strategies

A consistent branch naming convention makes your repository readable, searchable, and enables CI/CD automation. Good names communicate purpose at a glance and help the entire team stay organized.

01.Standard Prefix Conventions

Use prefixes to categorize: feature/ for new features, fix/ or bugfix/ for bugs, hotfix/ for urgent production issues, release/ for release preparation, chore/ for maintenance and tooling, docs/ for documentation-only changes, test/ for test additions. These are conventions, not enforced rules — but most teams adopt them.

Branch Visualization
featuremainHEAD
main
feature
HEAD

02.Rules for Great Branch Names

Always lowercase with hyphens (never underscores or spaces). Be specific: "feature/user-profile-avatar-upload" beats "feature/upload". Include ticket numbers when relevant: "feature/JIRA-420-password-reset". Avoid vague names like "test", "temp", "fix2", or "my-branch". Short enough to read, long enough to understand.

Commit Timeline
a1b2c3d
init
b2c3d4e
feat
c3d4e5f
fix
d4e5f6a
HEAD

Commands

commands — click to reveal output
$
git checkout -b feature/user-authentication
Descriptive feature branch
$
git checkout -b fix/login-null-pointer-crash
Specific bug fix branch
$
git checkout -b hotfix/xss-vulnerability-patch
Urgent production security fix
$
git checkout -b release/v2.1.0
Versioned release branch
$
git branch --list "feature/*"
List all feature branches with glob
▼ show output
KNOWLEDGE CHECK

Which branch name follows best practices?

Rate this lesson:
PreviousNext Lesson