Long-lived feature branches feel safe and bill you later: the two-week branch that takes a day to merge, and the merge nobody wants to re-run. Trunk-based development is the alternative that works well for small teams.
The rules, sized for a small team#
- Everything targets
main. Branches live hours to a couple of days, never weeks. - Main always runs: tests pass, migrations apply, the app boots.
- Review is quick and small, because the changes are small.
Half-done work still merges#
The objection is always “the feature is not finished”. Merge it anyway, behind a flag. In Laravel that is a config entry or a Feature::active() check, not a branch:
if (config('features.new_billing')) {
// new flow
}
Delete the flag when the feature ships. A flag you forget is cheaper than a branch you rebase for a month.
What it buys#
Conflicts stay small because diffs stay small. Main is deployable any day, so the git-push deploy from a tag or from main stops being an event. And code review gets read, because there is finally little enough of it.
Start with the rule that matters most: nothing lives on a branch longer than two days.
Share this post
Keep reading
Branch Protection Rules That Stick
Three rules cover most of the risk on main: review required, tests green, no force-push. More than that tends to get routed around.
Merging vs Rebasing on a Small Team
Rebase to tidy your own branch, merge to combine into main. One sentence of policy saves a lot of history arguments.
Code Review Habits That Keep Main Clean
Small changes, clear descriptions and fast feedback.