Git Branch Names from JIRA Ticket Numbers
Generate git branch names from JIRA ticket keys like PROJ-1234. Maintain traceability between JIRA issues and git branches with consistent naming.
Detailed Explanation
JIRA Ticket Branch Names
JIRA ticket keys follow the format PROJECT-NUMBER (e.g., PROJ-1234, AUTH-567). Including the JIRA key in your branch name creates automatic traceability between your project management tool and your git repository.
Standard Format
{type}/{jira-key}-{description}
Examples
| JIRA Ticket | Title | Branch Name |
|---|---|---|
| AUTH-1234 | Implement SSO login | feature/auth-1234-implement-sso-login |
| PLAT-567 | Fix database timeout | bugfix/plat-567-fix-database-timeout |
| DEVOPS-89 | Update Terraform modules | chore/devops-89-update-terraform-modules |
| UI-2345 | Redesign settings page | feature/ui-2345-redesign-settings-page |
JIRA Smart Commits Integration
When your branch name contains the JIRA ticket key, many tools provide automatic linking:
- Bitbucket automatically links branches to JIRA issues when the branch name contains the key
- GitHub (with JIRA integration) shows branch information in the JIRA issue sidebar
- GitLab can transition JIRA issues based on merge events when the branch contains the key
JIRA-Specific Naming Tips
- Preserve the key format — Keep the project prefix and number together:
auth-1234, notauth/1234 - Case sensitivity — JIRA keys are case-insensitive, but lowercase branch names are the convention:
auth-1234rather thanAUTH-1234 - Multiple tickets — When a branch addresses multiple tickets, use the primary ticket:
feature/auth-1234-implement-ssowith the secondary ticket referenced in commit messages - Epic branches — For work spanning multiple tickets under an epic, use the epic key:
feature/epic-100-user-management
Template Configuration
Set your branch template to {type}/{ticket}-{title} and enter the full JIRA key (e.g., AUTH-1234) in the ticket field. The tool normalizes the key to lowercase and joins it with the title using the selected convention.
Use Case
A development team using JIRA and Bitbucket needs a consistent way to name branches so that JIRA's smart commit integration automatically links branches to tickets and shows development progress in the issue tracker.