Skip to content
OddsockLocal
Local
Source text
Branch prefixfeature
ReadyRuns in this browser. Nothing is uploaded.

How to use

  1. Choose a prefix, or none.
  2. Type the ticket if you have one. It is lowercased and hyphenated.
  3. Type the summary in ordinary words.
  4. Copy the branch name. Creating the branch is still a git command.

What is Git branch name?

Branch names fail in boring ways: spaces, uppercase tickets, accents, a slash in the wrong place. This page builds one from a prefix, an optional ticket and a summary sentence. Prefix fix, ticket ABC-1, summary Fix URL parser becomes fix/abc-1-fix-url-parser.

Read more

Cleaning is aggressive on purpose. Letters are stripped of accents, everything that is not a letter or a digit becomes a hyphen, and the ends are trimmed. The ticket goes through the same cleaner, so ABC-1 becomes abc-1. Prefix none omits the prefix and the slash. An empty summary, or one that cleans to nothing, is an error.

The page does not create the branch. It does not talk to a remote. You copy the name into git switch -c. Prefixes are feature, fix, chore, release or none.

Use cases

  • A ticket ABC-1 needs a branch tonight and the summary still has spaces and capitals.
  • A release branch should not grow a feature/ prefix, so the prefix is set to none or release.
  • A title copied from a design doc has punctuation, and you want one hyphen where the punctuation was.
  • Two people would otherwise invent feature/Fix-URL and feature/fix-url for the same work.

A fix branch from a ticket and a sentence

Prefix fix, ticket ABC-1, summary Fix URL parser.

fix/abc-1-fix-url-parser

Why use Oddsock

The ticket and the summary share one cleaner, so ABC-1 cannot stay uppercase while the rest of the name is folded.

Related tools

Using this tool

feature, fix, chore, release and none. none drops the slash as well as the word.