Skip to content
shellhacks.dev
Git

Git Branch Name Generator

Turn an issue title and number into a clean Git branch name such as fix/412-login-500-email-plus-sign, cut at a word boundary and checked against Git's rules.

Free · No sign-up · Your inputs stay in your browser

Input

Generate a Git branch name from an issue

Output

fix/412-login-page-returns-500-email-plus-sign

Branch

fix/412-login-page-returns-500-email-plus-sign

Create it

git switch -c fix/412-login-page-returns-500-email-plus-sign

Lowercase, hyphenated, filler words dropped and cut at a word boundary. Putting the issue key in the name lets GitHub, GitLab and Jira link the branch to the issue automatically. Git forbids spaces, ~ ^ : ? * [ and \, two dots in a row, and a component starting with a dot (git check-ref-format describes the rules).

Runs in this browser. Nothing you paste is sent to a server.

Names that link themselves

Including the issue key lets GitHub, GitLab and Jira link the branch, its commits and its pull request to the issue automatically. A type prefix (feat/, fix/, chore/) sorts branches in lists and can trigger CI rules or branch protections by pattern.

What Git forbids

Branch names cannot contain spaces, the characters ~ ^ : ? * [ or a backslash, two consecutive dots, a component starting with a dot or ending in .lock, or the sequence @{. git check-ref-format defines the full rules.

Share

Frequently asked questions

How long should a branch name be?
Short enough to read in a terminal and a pull request list; around 50 characters is a common limit.
Can branch names contain slashes?
Yes, and they are used as folders by most tools. A branch named fix cannot coexist with one named fix/412, because one would be a file and the other a directory.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Go deeper

Suggested reading

Keep planning

Similar tools