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-loginorfeature/search-filters
- Example:
-
bugfix/– Fixes for non-critical bugs found during development- Example:
bugfix/typo-in-headerorbugfix/broken-link
- Example:
-
hotfix/– Urgent fixes for critical production issues- Example:
hotfix/payment-crashorhotfix/security-vulnerability
- Example:
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.