Slash-Separated Branch Naming Convention
Use slash-separated branch names to create hierarchical structures. Organize branches by type, team, or scope using multiple path segments.
Detailed Explanation
Slash-Separated Branch Naming
Slash-separated naming extends the basic type/description pattern by adding additional hierarchy levels. This creates a folder-like structure that some git clients and tools can display as a tree, making branch organization more visual.
Formats
type/ticket/description
type/team/ticket-description
type/scope/ticket/description
Examples
| Structure | Branch Name |
|---|---|
| Type + Ticket + Title | feature/PROJ-123/add-user-auth |
| Type + Team + Ticket | feature/backend/PROJ-123-api-endpoints |
| Type + Scope + Description | bugfix/payments/fix-double-charge |
| User-scoped | feature/alice/PROJ-456-dashboard-redesign |
Advantages of Hierarchical Branch Names
Tree view in git clients — Tools like SourceTree, GitKraken, and VS Code's Git Graph display slash-separated names as a folder tree, making it easy to browse branches by type or team.
Wildcard patterns — CI/CD systems and branch protection rules can match on any level:
feature/**matches all feature branches regardless of sub-structure, whilefeature/backend/*targets only backend features.Team organization — Large teams can include the team or developer name as a namespace:
feature/platform/PROJ-123-migrate-authvsfeature/mobile/PROJ-456-biometric-login.Scope isolation — When branches reference specific modules or services, the scope segment provides context:
bugfix/api/fix-rate-limit-headervsbugfix/ui/fix-modal-overflow.
Considerations
- Some older git tools may not handle deep nesting well (more than 3 levels)
- Longer branch names can be cumbersome in commit messages and terminal output
- Team must agree on the hierarchy depth and ordering to maintain consistency
- The
/character means you cannot have a branch namedfeatureiffeature/somethingexists (git limitation)
Use Case
A large engineering organization with multiple teams (backend, frontend, mobile, infra) needs branch names that indicate both the branch type and the responsible team for quick filtering in their monorepo.