Branching strategy
The main branch reflects what is currently “live” and/or deployed. Some rules of thumb:
Never commit and/or push directly to
main(branch protection should be set up on Github to prevent this happening by accident)All work should be done in branches
- It’s best to
git switch mainandgit pulljust before you start working on something to make sure you have the most up to date changes git switch -c <branchname>to create your new branch
- It’s best to
Name your branch something sensible. The following available prefixes should be used where appropriate:
feature/[name]for planned features, e.g.feature/certificate-graphql-endpointsfix/[name]for bug fixes e.g.fix/course-screen-layout-bugchore/[name]for work that doesn’t relate to a feature e.g.chore/update-css-linter- This is a non-exhaustive list but covers 95% of use cases. You can use an alternative prefix that makes sense when appropriate.
NOTE
ℹ️ Historically, ticket IDs were included in the branch name. This is no longer recommended. Nothing hooks into it and it’s unnecessarily long.