Turn an issue title into a git branch name
Type the ticket or what the work is. Get a feature/, bugfix/, hotfix/ or release/ name that git accepts, and the commands to create it.
- Free, no sign-up
- Nothing uploaded
- Name and git commands
Try one:
Saved git branch -a output to a file? or drop it on the box.
Branch types
| Type | For | Starts from | Merges into | Example |
|---|---|---|---|---|
| feature/ | New work, improvements, refactoring | develop | develop | feature/PROJ-123-password-reset-email |
| bugfix/ | A fix that can wait for the next release | develop | develop | bugfix/empty-cart-crash |
| hotfix/ | An urgent fix for production | main | main and develop | hotfix/482-payment-webhook-fails |
| release/ | Getting a version ready to ship | develop | main and develop | release/2.4.0 |
How it works
- Type the title. An issue title, a ticket key like PROJ-123 or an issue number like #482, or a version like 2.4.0. Words like fix, crash or error make it a bugfix; urgent, security or production make it a hotfix; release with a version makes it a release. Anything else is a feature. Change the type under Options.
- Get the name. Lowercase words joined by hyphens, accents removed, the ticket key in front, small words like the and a left out, and cut on a word boundary to the length you set.
- Read the check. The name is tested against every rule git applies to branch names, plus the things git allows that still cause trouble: capital letters, characters a shell treats specially, names that look like commit ids.
- Copy it. The name, the git switch command that creates it from the right branch, git push to publish it, git branch -m to rename the branch you are already on, the git flow command, and the steps to merge it back.
- Check what you have. Paste one branch name, or the whole output of git branch -a, to see which names git or the convention would object to, names that clash, and the rename commands.
Questions
- What is a good git branch name?
- Short, lowercase words joined by hyphens, with the type in front and the ticket key if you have one: feature/PROJ-123-password-reset-email, bugfix/empty-cart-crash, release/2.4.0. It should say what the work is, so anyone reading the branch list knows without opening it.
- Which characters are not allowed in a git branch name?
- Git refuses spaces, two dots in a row (..), the characters ~ ^ : ? * [ and backslash, control characters, @{, a name that starts with a dash, starts or ends with a slash or has two slashes in a row, ends with a dot, or has a part that starts with a dot or ends with .lock. A branch cannot be called HEAD either.
- What are feature, bugfix, hotfix and release branches?
- In Git Flow, feature branches are for new work and start from develop; release branches prepare a version and start from develop; hotfix branches fix production urgently and start from the production branch. Release and hotfix branches are merged into both the production branch and develop. bugfix branches, for fixes that are not urgent, come from the git-flow AVH tool and start from develop.
- Should a branch name have a slash or a dash after the type?
- The git-flow tool uses a slash: feature/name, release/1.4.0. The original Git Flow article named release and hotfix branches with a dash, release-1.4 and hotfix-1.4.1. Both work; pick one for the team. This page uses the slash by default and has the dash style under More options.
- Why can't I have a branch called feature and another called feature/login?
- Git keeps each branch as a file under .git/refs/heads, so feature/login needs a folder called feature, and a branch called feature is already a file with that name. Paste your git branch -a output to find clashes like this.
- Is anything uploaded?
- No. The names, the checks and the commands are worked out inside your browser tab. Only the optional AI step sends what you paste into it, and only when you press its button.