Course contentsShow
← Software Engineering
Lesson 57 of 1,9332. Version Control with GitFree lesson

Branch Naming Conventions

Explore common branch naming patterns like feature/, bugfix/, and hotfix/ for organizing work across teams.

Branch Naming Conventions

What you'll learn: How to name your Git branches clearly so everyone on your team knows what work is happening where.

Why Branch Names Matter

You've learned how to create branches, but imagine looking at a repository with branches called my-stuff, test123, and johns-branch. What's being worked on? Is it a new feature? A bug fix? An emergency repair?

Good branch names work like clear labels on folders—they instantly communicate what work is happening and why the branch exists.

Common Naming Patterns

Teams typically use prefixes followed by a descriptive name:

  • feature/ – New functionality being added

    • Example: feature/user-login or feature/search-filters
  • bugfix/ – Fixes for non-critical bugs found during development

    • Example: bugfix/typo-in-header or bugfix/broken-link
  • hotfix/ – Urgent fixes for critical production issues

    • Example: hotfix/payment-crash or hotfix/security-vulnerability

The Pattern

Most teams follow this structure:

type/short-description-with-hyphens

Keep descriptions brief but meaningful. Use hyphens (not spaces or underscores) between words. Lowercase is standard.

Why This Works

Think of branch names like street addresses. "123 Main Street" tells you exactly where to go. Similarly, feature/password-reset immediately tells your teammate: "This branch adds password reset functionality."

When everyone follows the same convention, you can quickly scan all branches and understand the state of your project. You'll know which branches contain new features in progress, which are fixing bugs, and which are handling emergencies.

Key Takeaway: Use consistent branch naming conventions like feature/, bugfix/, and hotfix/ with descriptive names to make your team's work transparent and organized.