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:
- Create a branch from
main(ordevelop) - Make your changes in that branch
- Open a Pull Request (PR)
- Get code review
- 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:
mainis always deployable- Create branches from
main - Merge back to
mainvia 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 onlydevelop- integration branch for featuresfeature/*- new featuresrelease/*- preparation for releasehotfix/*- 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 changesExamples:
1.0.0 → 1.0.1: Fixed a bug1.0.1 → 1.1.0: Added a new API endpoint1.1.0 → 2.0.0: Changed API response format
Git tags mark these versions:
# Create a version taggit tag -a v1.2.0 -m "Release version 1.2.0"
# Push tags to remotegit push origin v1.2.0
# List all tagsgit tag -lPull Request Process
The PR process is where most team collaboration happens. Here’s my typical workflow:
# 1. Start from the main branchgit checkout maingit pull origin main
# 2. Create a feature branchgit checkout -b feature/add-user-profile
# 3. Make changes and commitgit add src/components/UserProfile.tsxgit commit -m "feat: add user profile component"
# 4. Push to remotegit 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 featurebugfix/reset-password # Bug fixhotfix/security-patch # Urgent production fixrefactor/database-layer # Code improvementdocs/api-documentation # Documentation onlySome teams use ticket numbers:
PROJ-123/add-login-pagePROJ-456/fix-password-resetThe key is consistency. Whatever convention you choose, stick to it.
Summary
Here’s what I learned about professional Git workflows:
| Strategy | Best For | Complexity |
|---|---|---|
| GitHub Flow | Web apps, continuous deployment | Low |
| Git Flow | Enterprise, scheduled releases | High |
| Trunk-Based | Mature teams, fast iteration | High |
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