Date: 2025-02-27
Status
Accepted
Context
Our growing team and complex development workflow require a standardized approach to branch management that:
- Supports parallel feature development
- Enables safe collaboration across distributed teams
- Maintains clean repository history
- Automates repetitive Git operations
- Integrates with our eXtreme Programming practices (ADR-0015)
- Complements our CI/CD pipeline
Current challenges include:
- Inconsistent branching strategies between team members
- Manual merging and pipeline management
- Difficulty keeping long-lived branches in sync
- Error-prone release preparation process
- Lack of standardized workflow for hotfixes
Decision
We will adopt Git Town as our Git workflow automation tool with the following configuration:
-
Branching Model:
mainas perpetual production-ready branchdevelopmentas integration branch- Feature branches prefixed with
feature/ - Hotfix branches prefixed with
hotfix/
-
Workflow Commands:
git town hack <feature>- Start new featuregit town sync- Sync current branchgit town new-pull-request- Create PRgit town ship- Ship completed feature
-
Configuration:
git town main-branch main git town perennial-branches development git town branch-prefix-delimiter / git town sync-strategy rebase git town new-branch-push-flag true -
Integration with CI/CD:
- Branches pushed to origin automatically
- PR validation via GitHub Actions
- Ship command triggers deployment
Consequences
Positive
- Consistent branch management across team
- Automated sync of feature branches
- Standardized PR creation
- Clean, linear commit history
- Reduced merge conflicts
- Built-in workflow documentation
Negative
- Learning curve for Git Town commands
- Potential conflicts with IDE Git integrations
- Additional dependency for developers
- Need to update existing CI/CD scripts
Mitigation Strategies
-
Create Git Town cheatsheet for common workflows
-
Add Git Town configuration to project setup
-
Conduct team training session
-
Update CI/CD to handle Git Town branches
-
Use Git Town aliases in Makefile:
feature-start: git town hack $(name)