Skip to content
Live

Git Workflows for Modern Teams

From trunk-based development to GitFlow — choose the right branching strategy for your team size, release cadence, and deployment model.

By Soren Lindqvist8 min read

Branching Strategy Matters

The wrong Git workflow creates merge conflicts, delayed releases, and developer frustration. The right one makes shipping feel effortless.

Trunk-Based Development

Best for: small teams, continuous deployment, high-trust environments.

# Everyone commits to main (or short-lived feature branches)
git checkout -b feature/add-search
# ... make changes ...
git push origin feature/add-search
# Open PR → review → merge to main → auto-deploy

Rules:

  • Feature branches live less than 2 days
  • Main is always deployable
  • Use feature flags for incomplete work

GitFlow

Best for: scheduled releases, multiple versions in production.

main          ← production releases only
develop       ← integration branch
feature/*     ← new features (branch from develop)
release/*     ← release preparation
hotfix/*      ← emergency production fixes

Commit Message Convention

# Conventional Commits format
feat: add multilingual search
fix: resolve locale switcher hydration error
docs: update API documentation
refactor: extract BlogCard component
perf: lazy-load cover images
chore: upgrade Next.js to 14.2

Useful Git Commands

# Interactive rebase to clean up commits before PR
git rebase -i HEAD~5

# Stash work in progress
git stash push -m "WIP: search feature"
git stash pop

# Find which commit introduced a bug
git bisect start
git bisect bad HEAD
git bisect good v1.0.0

# Undo last commit but keep changes
git reset --soft HEAD~1

Choose the simplest workflow that meets your needs. Complexity in Git workflows compounds over time.

Share

Written by

Soren Lindqvist

Engineer. Ships the TypeScript, Docker, and database pieces, usually after breaking them in production first.

docker

Docker for Developers: A Practical Guide

Stop the 'works on my machine' problem forever. Learn Docker from containers to Compose to production-ready multi-stage builds.

Soren Lindqvist12 min read
programming

How to Contribute to Open Source

Your first open source contribution doesn't have to be a major feature. A practical guide to finding projects, making meaningful contributions, and building your reputation.

Amara Osei7 min read
css

Advanced Tailwind CSS Patterns

Go beyond utility classes. Learn Tailwind's plugin system, custom design tokens, component extraction, and the patterns that scale to large codebases.

Soren Lindqvist9 min read