Repository Rules
Branching strategy
Main Branches
main: This branch contains the stable, production-ready code. Only thoroughly tested and approved changes are merged here.dev: This is the integration branch for features and fixes. All new development work is merged here before it goes tomain.
Supporting Branches
Feature Branches: Used for developing new features. These branches are created from
devand merged back intodevonce the feature is complete.Naming convention:
feature/feature-name
Bugfix Branches: Used for fixing bugs. These branches are also created from
devand merged back intodevafter the fix.Naming convention:
bugfix/bug-name
Release Branches: When preparing for a new release, a release branch is created from
dev. This branch is used for final testing and minor bug fixes before merging intomain.Naming convention:
release/x.y.z
Hotfix Branches: For critical fixes that need to be applied to the production code immediately. These branches are created from
mainand merged back into bothmainanddev.Naming convention:
hotfix/x.y.z
Workflow Example
Feature Development
Create a feature branch from
dev:git checkout -b feature/new-feature devDevelop the feature and commit changes.
Merge the feature branch back into
dev:git checkout dev && git merge feature/new-featureDelete the feature branch:
git branch -d feature/new-feature
Release Preparation
Create a release branch from
dev:git checkout -b release/1.0.0 devPerform final testing and bug fixes.
Merge the release branch into
main:git checkout main && git merge release/1.0.0Tag the release:
git tag -a v1.0.0 -m "Release 1.0.0"Merge the release branch back into
dev:git checkout dev && git merge release/1.0.0Delete the release branch:
git branch -d release/1.0.0
Hotfix
Create a hotfix branch from
main:git checkout -b hotfix/1.0.1 mainApply the hotfix and commit changes.
Merge the hotfix branch into
main:git checkout main && git merge hotfix/1.0.1Tag the hotfix:
git tag -a v1.0.1 -m "Hotfix 1.0.1"Merge the hotfix branch into
dev:git checkout dev && git merge hotfix/1.0.1Delete the hotfix branch:
git branch -d hotfix/1.0.1
Merge Requests
Merge request must follow the Conventional Commits naming rules.