Branches
This document describes our best practices when creating branches to contribute to CRUK repos
info
The following content is recommended.
Rationale
A consistent branch name strategy may make life much simpler for everyone working on and reviewing your code.
Description
We should avoid using 'master' as our main branch, and instead name it 'main', as it has negative connotations and does not align with our inclusive language recommendations.
When naming a feature branch, use a relevant name, and don't forget to include your JIRA ticket or GitHub issue number. For creating branch names, you can use the regex ((feature|bugfix)/[ProductName]-[0-9]1,5 [w-]*|dependabot/.*)$
.
Examples
Branch Names that follow the convention: ✔️
- AM-2120-example-github-contributing
- feature/EM-1234-crud-operation
- bug-fix/AM-1234_tibco_issue
- refactor/EM-2789-form-page-props
- feature/OF-4567_DEPLOY_stack
Branch Names that do not follow the convention: ❌
- fix-1
- getRidOfBug