| category | Branch |
|---|---|
| severity | Awareness |
| online version | https://github.com/microsoft/PSRule.Rules.GitHub/blob/main/docs/en/rules/GitHub.Branch.Name.md |
Use a consistent naming convention for your branches to identify the work done in the branch.
A branch is a human readable movable pointer to a commit. A consistent naming convention help to:
- Identity work across a team or individuals.
- Integrate with continuous integration (CI) systems.
Some suggestions for naming your branches:
- users/username/description
- users/username/workitem
- bugfix/description
- features/feature-name
- hotfix/description
- shared/description
Avoid using branch names such as master.
Consider using an consistent naming convention for your branches. Avoid using branch names that may cause offence or exclude members in the community.
To configure this rule:
- Override the
GitHub_BranchName_Formatto set the allow branch format as a regular expression. Any branch name format is allowed by default. - Override the
GitHub_BranchName_Disallowedto set disallowed branch names.