Hotfix Branch Naming for Emergency Fixes
Name hotfix branches properly for emergency production patches. Follow the hotfix/ prefix convention used in Gitflow and similar branching models.
Detailed Explanation
Hotfix Branch Naming
Hotfix branches are created when a critical issue is discovered in production that cannot wait for the next scheduled release. They have the highest priority and follow an expedited review and deployment process.
Standard Format
hotfix/{ticket}-{description}
or for version-based hotfixes:
hotfix/v{version}-{description}
Examples
| Scenario | Branch Name |
|---|---|
| Security vulnerability patch | hotfix/sec-001-patch-xss-vulnerability |
| Database connection crash | hotfix/hot-234-fix-db-connection-pool-exhaustion |
| Payment processing failure | hotfix/inc-567-fix-stripe-webhook-timeout |
| Version-based patch | hotfix/v2.1.1-fix-auth-token-expiry |
Hotfix Workflow Integration
In Gitflow, hotfix branches have a unique lifecycle:
- Branch from
main(or the production tag) - Apply the fix with minimal, focused changes
- Merge to both
mainanddevelopto ensure the fix is not lost in the next release - Tag the merge commit on
mainwith a patch version (e.g.,v2.1.1)
Naming Conventions for Hotfixes
Hotfix branch names should communicate urgency and scope immediately. Including the incident or security advisory number (e.g., SEC-001, INC-567) helps operations and security teams trace the fix back to the original report. Keep the description focused on the specific symptom being addressed rather than the root cause, since the branch name is the first thing on-call engineers see during an incident.
The best hotfix names are short, precise, and unmistakably identify the problem: hotfix/fix-payment-double-charge is far better than hotfix/payment-issue.
Use Case
An on-call engineer receives a PagerDuty alert at 2 AM about payment transactions being double-charged. They need to create a hotfix branch immediately that clearly communicates the issue to the team for expedited review.