Branch Naming Guide
Guidelines for naming Git branches.
Format
Section titled “Format”GitFlow Prefixes
Section titled “GitFlow Prefixes”Follow GitFlow conventions:
| Type | Prefix |
|---|---|
| New feature | feature/ |
| Bug fix | bugfix/ |
| Urgent bug fix | hotfix/ |
See A successful Git branching model for full GitFlow specification.
Jira Ticket Reference
Section titled “Jira Ticket Reference”Branches must reference a Jira ticket:
feature/DEV-1234-add-somethingbugfix/DEV-5678-fix-somethingExceptions (routine operations like package upgrades) require manager approval before merging.
Writing Rules
Section titled “Writing Rules”Branch names use lowercase only. Convert proper nouns (LPL → lpl) and code concepts (SomeClass → someclass).
Word Separator
Section titled “Word Separator”Use hyphens - to separate words.
Special Characters
Section titled “Special Characters”Only use letters and numbers. Avoid:
- Underscore
_ - Backslash
\ - Dollar sign
$ - Parentheses
() - Asterisk
* - Ampersand
& - Percent
%
Exception: . is allowed only in version numbers.
Naming Content
Section titled “Naming Content”Length
Section titled “Length”Excluding the format prefix (e.g., feature/DEV-1234), use 3-8 words. More than 10 is too long.
Examples:
feature/DEV-1234-add-lpl-integrationfeature/DEV-1234-new-php-cs-fixer-rulesbugfix/DEV-1234-fix-exception-not-caught-in-engine-input-generationbugfix/DEV-1234-fix-null-not-working-cloning-tweakset
Articles like the can be omitted:
feature/DEV-1234-enhance-the-pdf-report→feature/DEV-1234-enhance-pdf-report
Grammar
Section titled “Grammar”Use nouns and gerunds. Verbs must be in simple present tense (not past tense or third person singular).
Content vs Commit Messages
Section titled “Content vs Commit Messages”Branch names are more concise than commit messages - they serve as identifiers or reminders rather than full descriptions.