Branching Strategy
Branch Types
RMC uses a simplified feature branch workflow suitable for on-demand deployment:
main (protected)
├── feature/user-authentication
├── bugfix/login-redirect-error
├── enhancement/dashboard-performance
└── hotfix/critical-security-patch
Branch Naming Convention
Format: <type>/<short-description>
Types:
feature/- New functionalitybugfix/- Fixes for existing functionalityenhancement/- Improvements to existing features (includes testing)hotfix/- Critical fixes for production issuesdocs/- Documentation-only changesrefactor/- Code restructuring without behavior changes
Examples:
feature/pdf-exportbugfix/data-grid-sortingenhancement/load-time-optimizationhotfix/memory-leak-fix
Description rules:
- Use lowercase with hyphens (kebab-case)
- Be specific but concise (2-4 words ideal)
- Avoid ticket numbers unless necessary for tracking
Creating a Branch
Always branch from main:
# Ensure the local repository is on main and up to date
git checkout main
git pull origin main
# Create and switch to new branch
git checkout -b feature/new-feature-name
Branch Lifecycle
- Create branch from current main
- Develop the feature with regular commits
- Push to remote regularly (at least daily)
- Open a pull request when the feature is complete
- Review and address feedback
- Merge after approval
- Delete the branch after successful merge