The simplest approach: one branch per feature
Branch off main, do your work, open a pull request, merge, delete the branch. For most small teams this is genuinely all you need - no elaborate model required.
git checkout -b feature/user-profile-page # ...make changes, commit... git push -u origin feature/user-profile-page
Where Git Flow starts to help
Git Flow adds dedicated develop and release branches on top of feature branches. It earns its keep on projects with scheduled releases and a real need to keep in-progress work separate from what's about to ship - but it's genuinely overkill for a small team shipping continuously.
Trunk-based development: the opposite philosophy
Here, everyone commits small, frequent changes almost directly to main, often behind feature flags so unfinished work doesn't affect real users. It demands strong test coverage and CI, but it avoids the long-lived branches that tend to rot and become painful to merge.
A few habits that matter more than the strategy itself
- Keep branches short-lived - a few days, not a few weeks
- Rebase or merge from
mainoften so conflicts stay small - Write commit messages that explain why, not just what changed
Picking one
For a small team, plain feature branches off main will take you further than people expect. Reach for something more structured only once the current approach is genuinely causing pain - not because a bigger company uses it.
Comments
Loading comments...
Related Articles
Taming Slow MongoDB Aggregation Pipelines in Production
An aggregation pipeline that returns instantly on your 500-document local dataset can crawl once it hits a few million real documents. Here's how to actually find and fix the stage that's costing you.
Read ArticleBuilding a Sliding-Window Rate Limiter for Node.js APIs with Redis
Fixed-window rate limiting looks fine in a demo and then lets through double the traffic right at the window boundary. Here's the sliding-window-counter approach that fixes that, built directly on Redis.
Read ArticleMulti-Tenant Data Isolation: Shared Schema vs Separate Databases
Every multi-tenant SaaS eventually has to answer one question honestly: how do you stop one customer from ever seeing another customer's data? Here's how the three common isolation strategies actually compare in practice.
Read Article