This page has git branch name ideas that we've gathered. We welcome feedback.
Contents:
Use direct imperative text, akin to a git commit message, that says what the branch does when it's merged.
Examples:
-
add-help-button
-
fix-page-layout
-
optimize-search-speed
Benefits: easy to understand the purpose, easy for inter-team communications.
Use a branch name with an emoji that's akin to an icon, colorful, and fun.
Examples:
-
🙂login-button (a smiling face emoji means add a feature)
-
🐛table-layout (a bug emoji means fix a bug)
-
🐇page-speed (a rabbit emoji means optimize an area to make it faster)
Benefits: easy to skim visually, fun for casual participants, creative.
Use a branch name with an issue number based on your issue tracker, for example your issue tracker has issue number 100 and your branch name could be "100-foo-bar".
Examples:
-
100-add-login-button
-
101-fix-table-layout
-
102-optimize-page-speed
Benefits: easy to jump between the issue tracker and the branch name.
Use a branch name with a version number, for example a branch for version 1.0.0 could be "1.0.0-foo-bar".
Examples:
-
1.0.0-add-login-button
-
1.0.1-fix-table-layout
-
1.1.0-optmize-page-speed
Benefits: easy to see version ranges, group them, and also delete them when the version is done.
Use a branch name with a date or time, for example a branch created on January 1 2020 could be "2020-01-01-foo-bar".
Examples:
-
2020-01-01-add-login-button
-
2020-01-02-fix-table-layout
-
2020-01-03-optimze-page-speed
Benefits: easy to see time ranges, group them, and also expire them after enough time has passed.
Use a branch name with your own group names, for example authentication/authorization could use "aa", or user interface branch could use "ui", or optimization opportunities could use "oo".
Examples:
-
aa-login-button
-
ui-table-layout
-
oo-page-speed
Benefits: easy to cluster by subteam, for example a security team looks at "aa", a design team looks at "ui", and a performance team looks at "oo".
Use a branch name with your own workflow tag name, for example work in progress could use the tag name "wip", or a branch ready for user acceptance testing could use the tag name "uat", or a temporarly research branch could start with the tag name "tmp".
Examples:
-
wip-login-button
-
uat-table-layout
-
tmp-page-speed
Benefits: easy to understand in terms of customer delivery planning, if the teams are able to update their branch names as the branches reach various stages of delivery.
Use a branch name with kebab case which means dashes, or snake case which means underscores, or camel case which means use upper-case letters instead of a separator characters.
Examples:
-
add-login-button (kebab case)
-
fix_table_layout (snake case)
-
optimizePageSpeed (camel case)
Use a slash "/" to simulate a directory and subdirectory.
Examples:
-
features/login-button
-
fixes/table-layout
-
optmizations/page-speed
Benefits: if you use a git GUI client that treats a slash "/" as a directory separator, then you may enjoy this kind of organization.
Caveats: Git branch names do not use directories, and many git clients and sites ignore the slash. Branches are implemented as paths, so you cannot have a branch named "foo" and another branch named "foo/bar".
To add more information to a branch, we edit the branch description, for example to say the purpose of the branch, or contact information for the maintainers, or links to issue tracker items.
To edit a branch description:
git branch --edit-description
To see a branch description:
git config branch.<name>.description
To set a branch description to one line:
git config branch.<name>.description "This is an example description"
To use a git alias, edit your git config file (such as ~/.gitconfig
) and add these git aliases:
bd = !"git config branch.$(git rev-parse --abbrev-ref HEAD 2>/dev/null).description"
be = branch --edit-description
To set the current branch description:
git bd "This is an example branch"
To see the current branch description:
git bd
To edit the current branch description:
git be
(launches your editor)
Our related repos:
-
Git commit message: how to write a great git commit message and commit template for version control
-
GitHub special files and paths, such as README, LICENSE, /.github, /docs
Git branch organization:
Git alias ideas: