Skip to content

Naming Branches

There are two core unique branches whose names should not be changed and have special usage:

  • main - This is the main project branch.  This branch should be stable at all times and nobody should submit to it.  It will be merged into by an approved release branch.
  • develop - This is the main development branch.  Engineers should be able to pull from this branch and have a stable development copy off of the current release.  This branch can only be merged into by reviewed and tested feature and bug branches. 

In some projects, there are two more core branches

  • release/major.minor.0 -  This is an official release of software that went past QA to UAT (user acceptance testing).  Pulling from this branch will be considered a stable representation.  If there are issues found in UAT, then a hotfix/ branch should be created.  An example name is “release/1.3.0”.
  • hotfix/major.minor.patch - This is an official fix for a released branch that went past QA to UAT.  Pulling from this branch will be considered a stable representation.  An example name is “hotfix/1.3.3”.

When Jira is used (99% of the time), include a ticket number in the branch name.  This will help tie it back to our board and anyone looking at branches can easily go back to the core information.  And example name is “abc-123_add_login_password_filtering”.

  • feature/ - This is a feature branch for a feature being implemented.  An example name is “feature/abc-123_add_login_password_filtering”
  • bug/ - This is a bug branch for implementing a bug fix.  And example name is “bug/abc-456_fixing_login_password_filtering”

Use dashes (”-”) for ticket numbers and underscores (”_”) to separate words.  Don’t use kebab, run-on, Pascal or camel-case. 

  • Do: this_is_using_underscores, abc-123_this_is_using_underscores
  • Don’t do: abc123thisIsNotUsingUnderscores and thisisnotusingunderscores and this-is-not-using-underscores
  • Name branches as simply the ticket number.