01
Overview
GitFlow: main, develop, feature, release, hotfix branches. GitHub Flow: main + feature branches, PR-based. Trunk-based: everyone commits to main, short-lived branches. Choose by team size and release cadence.
bash
git checkout -b feature/login
git push -u origin feature/login
# GitFlow
git flow feature start login
git flow feature finish login02
Best Practices
GitHub Flow for simplicity (small teams, continuous deploy). GitFlow for structured releases. Trunk-based for CI/CD speed. Keep branches short-lived. Delete branches after merge. Use conventional branch names (feature/, fix/, hotfix/).
Ready to try Branching Strategies?
Visit the official site for the latest version and full documentation.
Visit Branching Strategies