Traditional branching model for small teams preferring manual control and predictable releases.
Classic GitFlow adapted for small teams (2-5 developers):
main and develop branchesAutomation Level: 0% (manual) Human Intervention: Full control
main ─────●─────────────●─────────────●───── (production)
│ │ │
│ release/1.0 release/1.1
│ │ │
develop ──●──────●───────────────●───────── (integration)
│ │ │
feature/a ●──────● │
│
feature/b ────────●──────────────●
│
hotfix/critical ─────────────────●──────── (emergency)
release/* and hotfix/*feature/add-login, feature/api-v2, feature/JIRA-123developdevelop via PRrelease/1.0.0, release/2.1.0developmain AND develophotfix/security-patch, hotfix/critical-bugmainmain AND develop# Ensure develop is up to date
git checkout develop
git pull origin develop
# Create feature branch
git checkout -b feature/add-authentication
# Work on feature
# ... make changes ...
git add .
git commit -m "feat: add user authentication"
# Keep up with develop
git fetch origin develop
git rebase origin/develop # or merge
# Push feature branch
git push -u origin feature/add-authentication
# Create Pull Request on GitHub/GitLab
# - Base: develop
# - Compare: feature/add-authentication
# - Request review from team
# After approval, merge (via UI or CLI)
git checkout develop
git merge --no-ff feature/add-authentication
git push origin develop
# Clean up
git branch -d feature/add-authentication
git push origin --delete feature/add-authentication
# Create release branch
git checkout develop
git checkout -b release/1.0.0
# Update version
# Edit package.json, setup.py, etc.
git commit -am "chore: bump version to 1.0.0"
# Fix any last-minute bugs
git commit -am "fix: resolve edge case in auth"
# Update changelog
git commit -am "docs: update CHANGELOG for 1.0.0"
# Merge to main
git checkout main
git merge --no-ff release/1.0.0
git tag -a v1.0.0 -m "Release 1.0.0"
git push origin main --tags
# Merge back to develop
git checkout develop
git merge --no-ff release/1.0.0
git push origin develop
# Clean up
git branch -d release/1.0.0
git push origin --delete release/1.0.0
# Create hotfix from main
git checkout main
git checkout -b hotfix/security-vulnerability
# Fix the issue
git commit -am "fix: patch critical security issue"
# Merge to main
git checkout main
git merge --no-ff hotfix/security-vulnerability
git tag -a v1.0.1 -m "Hotfix 1.0.1"
git push origin main --tags
# Merge to develop
git checkout develop
git merge --no-ff hotfix/security-vulnerability
git push origin develop
# Clean up
git branch -d hotfix/security-vulnerability
☐ All features merged to develop
☐ All tests passing
☐ Code review completed
☐ Version number updated
☐ CHANGELOG.md updated
☐ Documentation updated
☐ Release branch created
☐ Final testing on release branch
☐ Merged to main
☐ Version tagged
☐ Merged back to develop
☐ Release branch deleted
☐ Deployed to production
☐ Release notes published
<type>(<scope>): <subject>
<body>
<footer>
Types:
| Type | Usage |
|——|——-|
| feat | New feature |
| fix | Bug fix |
| docs | Documentation |
| style | Formatting |
| refactor | Code restructuring |
| test | Adding tests |
| chore | Maintenance |
Examples:
feat(auth): add OAuth2 support
fix(api): resolve null pointer in user endpoint
docs(readme): update installation instructions
| Benefit | Description |
|---|---|
| Simple | Easy to understand and teach |
| Predictable | Clear release schedule |
| Controlled | Full human oversight |
| Auditable | Clear history via merge commits |
| Low Tooling | Works with basic git |
| Drawback | Description |
|---|---|
| Manual | Error-prone without automation |
| Slow | No continuous deployment |
| Merge Heavy | Many merge operations |
| Doesn’t Scale | Challenging for large teams |
| Feature Freeze | Required before release |
✅ Good Fit:
❌ Poor Fit: