Simplified GitFlow

Traditional branching model for small teams preferring manual control and predictable releases.

Overview

Simplified GitFlow

Pattern Description

Classic GitFlow adapted for small teams (2-5 developers):

Automation Level: 0% (manual) Human Intervention: Full control

Branch Structure

main ─────●─────────────●─────────────●───── (production)
          │             │             │
          │    release/1.0    release/1.1
          │      │               │
develop ──●──────●───────────────●───────── (integration)
          │      │               │
feature/a ●──────●               │
                                 │
feature/b ────────●──────────────●
                                 │
hotfix/critical ─────────────────●──────── (emergency)

Branch Types

main (Protected)

develop (Integration)

feature/* (Feature Development)

release/* (Release Preparation)

hotfix/* (Emergency Fixes)

Complete Workflow

1. Start New Feature

# 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

2. Complete Feature

# 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

3. Prepare Release

# 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"

4. Finish Release

# 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

5. Hotfix (Emergency)

# 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

Release Checklist

☐ 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

Commit Message Convention

<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

Advantages & Disadvantages

✅ Advantages

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

❌ Disadvantages

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

When to Use

Good Fit:

Poor Fit:

Tips for Success

  1. Keep features small — Easier to review and merge
  2. Merge frequently — Avoid long-lived branches
  3. Use PR templates — Consistent review process
  4. Automate what you can — Tests, linting, build
  5. Document decisions — Clear commit messages

← Back to Git Flows Overview