Template Branch Management
Managing template versions and branches
Overview
AgileBuilder supports managing different versions of templates through Git branches, enabling you to maintain multiple versions, parallel development, and easy rollbacks.
Why Branch Management Matters
- Version iteration: Maintain separate branches for different template versions
- Experimental features: Work on new features in separate branches without affecting stable versions
- Team collaboration: Multiple people can develop different features simultaneously
- Release management: Ship stable versions from specific branches
Branch Naming Conventions
We recommend the following naming conventions:
| Branch Type | Naming Format | Example |
|---|---|---|
| Main | main | main |
| Development | develop | develop |
| Feature | feature/* | feature/add-typescript |
| Bug Fix | fix/* | fix/correct-dependencies |
| Release | release/* | release/v1.0.0 |
Branch Operations
Adding a Template from a Specific Branch
agilebuilder template add https://github.com/your-org/your-template.git --branch develop
Switching Template Branches
agilebuilder template update my-template --branch feature/new-feature
Viewing Template Branches
agilebuilder template info my-template --show-branches
Managing Multiple Versions
Version Tags
Use Git tags to mark releases:
git tag v1.0.0
git push origin v1.0.0
Using a Specific Version
agilebuilder template add https://github.com/your-org/your-template.git#v1.0.0
Workflows
Developing a New Feature
# 1. Create a feature branch from main
git checkout -b feature/new-feature
# 2. Make your changes and commit
git commit -m "feat: add new feature"
# 3. Push the branch
git push origin feature/new-feature
# 4. Test the feature branch template
agilebuilder template add https://github.com/your-org/your-template.git --branch feature/new-feature
Releasing a Stable Version
# 1. Merge into main
git checkout main
git merge feature/new-feature
# 2. Create a release tag
git tag v1.0.0
# 3. Push with tags
git push origin main --tags
Branch Strategy Example
main (stable releases)
├── v1.0.0 ─────────────────────────
│
develop (development)
├── feature/typescript ──────────────
├── feature/new-ui ──────────────────
└── fix/bug ─────────────────────────
Best Practices
- Keep main stable - It should always be safe to generate projects from it
- Use semantic versioning - v1.0.0, v1.1.0, v2.0.0
- Merge regularly - Bring feature branches back into develop
- Update documentation - Refresh docs with each release
Next Steps
- Template Advanced Features - Learn advanced template techniques
- Getting Started with Templates - Back to basics