docs: update git workflow to release-based branching
- Rename master to main - Add release branch workflow (release/vX.Y.Z) - Feature branches now created from release branches - Release branches merge to main when confirmed good
This commit is contained in:
26
CLAUDE.md
26
CLAUDE.md
@@ -46,10 +46,26 @@ uv run mypy src # Type check
|
||||
|
||||
## Git Workflow
|
||||
|
||||
Trunk-based development with short-lived branches:
|
||||
Release-based workflow with feature branches:
|
||||
|
||||
- `feature/<story-id>-description` - New features
|
||||
- `fix/<description>` - Bug fixes
|
||||
- `chore/<description>` - Maintenance
|
||||
### Branch Structure
|
||||
|
||||
Merge to `main` when complete. Delete branch after merge.
|
||||
- `main` - Production-ready code only. Release branches merge here when confirmed good.
|
||||
- `release/vX.Y.Z` - Release branches. Created from `main`, feature branches merge here.
|
||||
- `feature/<story-id>-description` - Feature branches. Created from a release branch.
|
||||
- `fix/<description>` - Bug fix branches. Created from a release branch.
|
||||
- `chore/<description>` - Maintenance branches. Created from a release branch.
|
||||
|
||||
### Workflow
|
||||
|
||||
1. **Start a release**: Create `release/vX.Y.Z` from `main`
|
||||
2. **Develop features**: Create `feature/` branches from the release branch
|
||||
3. **Complete features**: Merge feature branches back to the release branch
|
||||
4. **Ship release**: When release is confirmed good, merge release branch to `main`
|
||||
|
||||
### Rules
|
||||
|
||||
- Release branches are always created from `main`
|
||||
- Feature/fix/chore branches are always created from a release branch
|
||||
- Never commit directly to `main`
|
||||
- Delete feature branches after merging to release
|
||||
|
||||
Reference in New Issue
Block a user