piapia123
en

Git Branch Name Generator

Web

Everything runs locally in your browser — nothing is uploaded

Input
Drop a file here to load its contents
Output

Turn one issue title per line into a clean branch name — `Fix login redirect bug` becomes `fix/123-fix-login-redirect-bug`, and a title written in Chinese becomes a pinyin branch such as `fix/123-xiu-fu-deng-lu`. Choose the type prefix (feat / fix / hotfix / chore / docs / refactor / test / style / perf / ci / build / revert / none), the separator inside the name (hyphen or underscore), an optional issue number and its position (after the prefix, or at the end), plus a maximum length for the whole branch name. The point is that the two separators live at different levels: prefix and body are always joined by `/`, and only the body uses your chosen separator — so underscore mode gives `feat/add_login`, never `feat_add_login` with the slash replaced too. The length limit counts the prefix and number first, then trims the body on word boundaries. Everything runs locally in your browser, and titles are never uploaded.

Features

  • Type prefix: feat / fix / hotfix / chore / docs / refactor / test / style / perf / ci / build / revert / none
  • Separator: hyphen or underscore, applied only inside the body
  • Prefix and body are always joined by `/`, unaffected by the separator option
  • Optional issue number, placed after the prefix or at the end
  • Non-digits in the issue number are stripped (`AB-123` becomes `123`)
  • The length limit counts the prefix and number, then trims the body by word
  • Chinese titles are converted to pinyin, leaving no Han characters
  • One title per line, so a batch can be generated together
  • Each line also shows the breakdown (prefix / body / issue)
  • Copy any row on its own

How to use

  1. Paste one issue title per line
  2. Pick the type prefix and the separator inside the name
  3. Add an issue number if you want one, and choose its position
  4. Adjust the length limit, then copy the branch name from the row

FAQ

Why does underscore mode give `feat/add_login` and not `feat_add_login`?
Because the two separators do different jobs. Between the prefix and the body sits a segment separator, always `/` (in git it maps to a directory level, which carries meaning); only the words inside the body use a hyphen or underscore. Replacing the slash too produces a completely different branch name, and both look plausible, which is exactly why it is easy to confuse.
What happens to a Chinese title?
It becomes pinyin, so a Chinese title ends up as `xiu-fu-deng-lu`. This reuses the site slug capability, which loads the pinyin dictionary on demand. English titles skip that step and are simply lowercased and split into words.
How is the length limit calculated?
It is the length of the whole branch name, including the type prefix and the issue number. The tool subtracts the prefix and number first, gives the rest to the body, and trims the body on word boundaries — rather than trimming the body first and only then discovering the whole name is still too long.
Are these branch names sent anywhere?
No. Generation happens entirely in your browser; the titles never leave the device and no API is called.

Related tools