GIT branch naming convention


Naming conventions for Git branches can vary depending on the organization or team’s preferences and workflow. However, there are some commonly used conventions that you may find helpful:

  1. Master/Main branch: The main branch of the repository is typically named master or main, and it contains the most stable and up-to-date code.
  2. Feature branches: Branches created for implementing new features are typically named with a prefix feature/ followed by a short and descriptive name of the feature. For example, feature/login, feature/search, or feature/payment.
  3. Bugfix branches: Branches created for fixing bugs in the code are typically named with a prefix bugfix/ followed by a short and descriptive name of the bug or issue. For example, bugfix/404-error, bugfix/database-connection, or bugfix/security-issue.
  4. Release branches: Branches created for preparing a new release are typically named with a prefix release/ followed by the version number of the release. For example, release/1.0, release/2.1, or release/3.2.5.
  5. Hotfix branches: Branches created for fixing critical bugs in the code in production are typically named with a prefix hotfix/ followed by a short and descriptive name of the bug or issue. For example, hotfix/security-vulnerability, hotfix/database-crash, or hotfix/missing-file.

These naming conventions can help to organize and standardize the Git branch naming in a team, making it easier to understand the purpose and content of each branch. However, it’s important to remember that the conventions are not strict rules, and you can use any naming convention that works best for your team and project.