Branching Strategy
This project follows a simple but effective branching strategy centered around two main branches:
Main Branches
- main: The production-ready branch that always contains stable, releasable code.
- Always deployable
- Protected from direct pushes
-
Changes come from merged PRs from the
dev
branch -
dev: The development branch where features and fixes are integrated.
- Used for day-to-day development work
- Integration branch for features and fixes
- Code here should pass all tests but may not be production-ready
- Pull requests target this branch
Feature Development
When working on new features or bug fixes, follow these steps:
-
Create a feature branch from
dev
: -
Make your changes, commit them, and push to your feature branch:
-
Create a pull request from your feature branch to the
dev
branch. -
After review and approval, your changes will be merged into the
dev
branch.
Releases
When the dev
branch contains enough features for a release or a scheduled release is due:
- Create a pull request from
dev
tomain
. - Review the changes thoroughly.
- After approval, merge the pull request to deploy to production.
- Tag the release in the
main
branch with a version number.
Hotfixes
For critical production issues:
-
Create a hotfix branch from
main
: -
Fix the issue, commit, and push:
-
Create PRs to both
main
anddev
branches to ensure the fix is applied to both branches.