We use a structured branching model to enusre efficient collaboration and a smooth workflow.
main
(ormaster
): This is the production-ready branch. All code here is stable and deployed to production.development
: This is the integration branch where all features are merged before being released.
-
Feature Branches: Used for developing new features.
- Naming conventions:
feature/<short-desctiption>
(e.g.,feature/login-page
). - Merge into
development
once the feature is complete.
- Naming conventions:
-
Bugfix Branches: Used for fixing bugs in
develop
ormain
.- Naming convention:
bugfix/<short-description>
(e.g.,bugfix/header-crash
). - Merge into
develop
ormain
.
- Naming convention:
-
Release Branches: Used when preparing for a release from
develop
.- Naming convention:
release/<version>
(e.g.,release/1.0.0
). - Merge into both
main
anddevelop
.
- Naming convention:
-
Hotfix Branches: Used for urgent fixes in
main
.- Naming convention:
hotfix/<short-description>
(e.g.,hotfix/login-bug
). - Merge into both
main
anddevelop
.
- Naming convention:
-
Start a new feature branch:
git checkout -b feature/add-user-profile
-
Push the branch and collaborate:
git push origin feature/add-user-profile
-
Merge feature into
development
once complete:git checkout develop
git merge feature/add-user-profile
-
Create a release branch:
git checkout -b release/1.0.0
-
Merge release branch into
main
for production:git checkout main
git merge release/1.0.0
By following this branching strategy, we ensure that features, fixes, and releases are managed consistently across teams.