← CodeClarityLab Home
Browse by Category
+ added · updated 7d
← Back to glossary

Branch Naming Conventions

style Beginner

Also Known As

branch naming git branch convention feature branch

TL;DR

Consistent branch names using type/description patterns — making branch purpose immediately clear and enabling automation based on branch name prefixes.

Explanation

Common convention: type/short-description where type is feature, fix, hotfix, release, chore, refactor, or docs. Examples: feature/user-oauth-login, fix/checkout-total-rounding, hotfix/critical-xss-patch, release/2.1.0. Rules: lowercase only, hyphens not spaces (spaces are awkward in shell), descriptive but concise. Include ticket/issue number for traceability: feature/PROJ-123-user-oauth. Protected branches (main, develop, release/*) enforced via branch protection rules.

Common Misconception

Branch names are just for the developer who created the branch — branches appear in PR titles, CI pipeline logs, deployment dashboards, and Slack notifications; clear names help the whole team.

Why It Matters

A branch named fix/payment-double-charge-on-retry is instantly understood by every team member; a branch named pauls-fix requires context to understand urgency and scope.

Common Mistakes

  • Spaces in branch names: git checkout -b 'my feature' — problematic in many shell contexts.
  • All changes in main/develop without feature branches — no code review, no CI isolation.
  • Single-letter or cryptic names: fix/abc, wip2, test-branch.
  • No type prefix — cannot distinguish features from fixes from hotfixes at a glance.

Code Examples

✗ Vulnerable
# Cryptic branch names:
git checkout -b paul
git checkout -b fix
git checkout -b new-stuff
git checkout -b wip-checkout
git checkout -b 'my feature branch'  # Space causes problems
# In GitHub: 23 open PRs, no idea what any of them are
✓ Fixed
# Clear convention: type/ticket-description
git checkout -b feature/PROJ-123-user-oauth-login
git checkout -b fix/PROJ-456-checkout-total-rounding
git checkout -b hotfix/critical-xss-in-comment-form
git checkout -b release/2.1.0
git checkout -b chore/upgrade-dependencies-march

# Enforced by CI: branch must match pattern
# ^(feature|fix|hotfix|release|chore|refactor|docs)\/[a-z0-9-]+$

Added 16 Mar 2026
Edited 22 Mar 2026
Views 22
Rate this term
No ratings yet
🤖 AI Guestbook educational data only
| |
Last 30 days
0 pings W 0 pings T 1 ping F 0 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 1 ping F 0 pings S 0 pings S 1 ping M 0 pings T 0 pings W 0 pings T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 1 ping T 1 ping F 0 pings S 0 pings S 0 pings M 0 pings T 0 pings W 0 pings T
No pings yet today
No pings yesterday
Perplexity 6 Amazonbot 6 Ahrefs 3 Google 2 Unknown AI 2
crawler 18 crawler_json 1
DEV INTEL Tools & Severity
🟢 Low ⚙ Fix effort: Low
⚡ Quick Fix
Use consistent prefixes: feature/, fix/, hotfix/, release/, chore/ — include the ticket ID (feature/PROJ-123-add-payment) so branches are automatically linked to issues
📦 Applies To
git any
🔗 Prerequisites
🔍 Detection Hints
Branch names like 'dev' 'test' 'johns-branch'; no link to issue tracker; branches surviving for months
Auto-detectable: ✗ No git github gitlab
⚠ Related Problems
🤖 AI Agent
Confidence: Medium False Positives: Medium ✗ Manual fix Fix: Low Context: File

✓ schema.org compliant