Branching Strategies
Trunk Based
- Single branch (mainline)
- High team maturity
- Feature toggles (feature flags)
- Continuous Deployment
Feature Branching
- One branch per feature
- Short delivery
- Continuous Delivery
- Pull Requests to merge to mainline
Forking Strategy
- Fork whole repository
- Open-source projects
- Do not deal with permissions
Release Branching
- One branch per release
- Low frequency deployments
- Waterfall
- No continuos integration
- Support for previous releases (backwards compatibility)
- No automation
Git flow
- Many branches (mainline, development, releases, features)
- Long lived branches
- Complex and not recommended
Github flow
- PR flow
- Short-lived branches merged via PRs
Environment branching
- Environment branches on top of all others
- Worst approach
Good practices