LabWired Git Flow
This document details our Git Flow branching strategy and the rules governing branch management.
1. Branch Hierarchy
Permanent Branches
main: Represents the latest stable, production-ready release.develop: The integration branch for the next release. Contains the latest successfully merged features.
Supporting Branches
feature/*: For new features, enhancements, or experiments.- Base:
develop - Target:
developvia Pull Request.
- Base:
release/*: For preparing a new production release.- Base:
develop - Target:
mainANDdevelopvia Pull Request.
- Base:
hotfix/*: For critical bug fixes in production.- Base:
main - Target:
mainANDdevelopvia Pull Request.
- Base:
2. Working Workflow
- Create a branch: Start from
developfor features ormainfor hotfixes. - Commit changes: Follow Conventional Commits.
- Open a Pull Request: Target the appropriate branch (
developormain). - Wait for CI: All automated tests, lints, and audits MUST pass.
- Resolve Conversations: All comments must be addressed or resolved.
- Merge:
feature/*->develop: Squash and Merge.release/*->main: Merge Commit (to preserve versioning history).hotfix/*->main: Merge Commit.
3. Branch Protection Rules
The main and develop branches are protected with the following rules:
- Require status checks to pass: The CI
buildjob (including tests, lints, and audits) must succeed. - Require conversation resolution: All discussions must be closed.
4. Feature Implementation Rule
New functionality can ONLY be merged after a Pull Request is approved and all CI tests are confirmed green.