Course contentsShow
← Data Science
Lesson 2007 of 2,14546. Version Control with GitFree lesson

Branch Naming Conventions

Best practices for naming branches: feature/, bugfix/, hotfix/ prefixes and descriptive names.

Branch Naming Conventions

You'll learn how to name Git branches consistently using prefixes and descriptive labels that communicate intent at a glance.

Why Branch Names Matter

Imagine walking into a laboratory where every flask is labeled "experiment." You'd have no idea which contains what or why it exists. Branch names work the same way—they're labels that tell you (and your teammates) the purpose of a line of work without opening it.

Standard Prefixes

Professional teams use prefix conventions to categorize branches by their intent:

  • feature/ – New functionality you're building (e.g., feature/user-authentication, feature/dashboard-redesign)
  • bugfix/ – Fixing non-critical issues found in development (e.g., bugfix/chart-rendering-error)
  • hotfix/ – Urgent fixes needed in production code (e.g., hotfix/login-crash)

Other common prefixes include experiment/ for exploratory work, refactor/ for code restructuring, or docs/ for documentation updates.

Descriptive Names

After the prefix, use clear, descriptive names separated by hyphens:

  • ✅ Good: feature/customer-churn-model
  • ✅ Good: bugfix/missing-data-validation
  • ❌ Bad: feature/stuff
  • ❌ Bad: my-branch

Descriptive names tell the story: what this branch changes and why it exists. Anyone reviewing your repository should understand the branch's purpose without reading commit messages.

Consistency is Key

Pick conventions and stick to them across your team. Some teams add ticket numbers (feature/DS-123-churn-model), others keep it simpler. What matters is that everyone follows the same pattern, making it easy to scan, filter, and understand branch lists at a glance.

Key Takeaway: Use prefixed, descriptive branch names like feature/customer-segmentation or hotfix/data-pipeline-timeout to communicate purpose clearly and maintain organized Git repositories.