Skip to content

What Git Branching Strategy Do Professional Teams Use?

Purpose

When I joined my first professional development team, I was confused by Git. I knew how to commit and push, but the team had branches everywhere - develop, staging, release/1.2.0, hotfix/login-bug. I had no idea what was going on.

This post explains the Git branching strategies that professional teams actually use, so you can walk into any team and understand their workflow immediately.

The Feature Branch Workflow

Professional teams almost universally use a feature branch workflow. Instead of committing directly to the main branch, every change gets its own branch.

Here’s what this looks like:

main ──●──────●──────●──────●──
/ \
feature/login ●────●────●──── (merged via PR)
\
●────●────● (more commits)

The process is simple:

  1. Create a branch from main (or develop)
  2. Make your changes in that branch
  3. Open a Pull Request (PR)
  4. Get code review
  5. Merge after approval

This keeps main stable and lets multiple developers work simultaneously without stepping on each other.

Common Branching Strategies

GitHub Flow (Simple, Most Common)

GitHub Flow is the simplest workflow and works great for most teams:

main ──●────●────●────●────●────●──
\ /
feature ●────●────●── (PR → merge)

Rules:

  • main is always deployable
  • Create branches from main
  • Merge back to main via PR
  • Deploy from main

I’ve used this on teams of 5-20 developers, and it works well for continuous deployment scenarios.

Git Flow (Complex, Enterprise)

Git Flow is more structured and used by teams with formal release cycles:

master ──●────────────●────────●──
\ ↑
release ●────●────●── merge
/
develop ──●────●────●────●────●────●──
/ \
feature ●────●────●──── (merged to develop)

Branch types:

  • master - production code only
  • develop - integration branch for features
  • feature/* - new features
  • release/* - preparation for release
  • hotfix/* - emergency fixes to production

I found Git Flow overkill for most web applications. It shines when you have scheduled releases (e.g., mobile apps, desktop software) where you need to maintain multiple versions.

Trunk-Based Development (Advanced)

Some teams (Google, Facebook) use trunk-based development:

main ──●────●────●────●────●────●──

Everyone commits directly to main. Features are hidden behind flags until ready.

This requires:

  • Excellent test coverage
  • Feature flags
  • Fast CI/CD

I wouldn’t recommend this for beginners. It’s fast but requires engineering maturity.

Semantic Versioning

When teams talk about release/1.2.3, they’re using semantic versioning:

MAJOR.MINOR.PATCH
1.2.3
│ │ │
│ │ └── PATCH: Bug fixes (backward compatible)
│ └──── MINOR: New features (backward compatible)
└────── MAJOR: Breaking changes

Examples:

  • 1.0.0 → 1.0.1: Fixed a bug
  • 1.0.1 → 1.1.0: Added a new API endpoint
  • 1.1.0 → 2.0.0: Changed API response format

Git tags mark these versions:

terminal
# Create a version tag
git tag -a v1.2.0 -m "Release version 1.2.0"
# Push tags to remote
git push origin v1.2.0
# List all tags
git tag -l

Pull Request Process

The PR process is where most team collaboration happens. Here’s my typical workflow:

terminal
# 1. Start from the main branch
git checkout main
git pull origin main
# 2. Create a feature branch
git checkout -b feature/add-user-profile
# 3. Make changes and commit
git add src/components/UserProfile.tsx
git commit -m "feat: add user profile component"
# 4. Push to remote
git push -u origin feature/add-user-profile
# 5. Open PR via GitHub CLI (or web interface)
gh pr create --title "Add user profile component" --body "Implements user profile display"

After the PR is open:

  • Teammates review your code
  • CI runs tests automatically
  • You address feedback
  • A maintainer merges (or you merge if you have permissions)

PR size matters. I try to keep PRs under 400 lines of code. Large PRs get skipped or rubber-stamped, defeating the purpose.

Branch Naming Conventions

Good branch names tell you what the branch is for:

feature/add-login-page # New feature
bugfix/reset-password # Bug fix
hotfix/security-patch # Urgent production fix
refactor/database-layer # Code improvement
docs/api-documentation # Documentation only

Some teams use ticket numbers:

PROJ-123/add-login-page
PROJ-456/fix-password-reset

The key is consistency. Whatever convention you choose, stick to it.

Summary

Here’s what I learned about professional Git workflows:

StrategyBest ForComplexity
GitHub FlowWeb apps, continuous deploymentLow
Git FlowEnterprise, scheduled releasesHigh
Trunk-BasedMature teams, fast iterationHigh

Key practices for any workflow:

  • Use feature branches (never commit directly to main)
  • Write clear commit messages
  • Keep PRs small and focused
  • Get code review before merging
  • Use semantic versioning for releases

Most teams I’ve worked with use GitHub Flow. It’s simple, effective, and works well with CI/CD. Start there, and only reach for Git Flow if you have a specific need for release branches.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments