dev3 ·
We are four developers and keep arguing about Git flow versus trunk-based development. Which branching strategy suits a small team shipping a web app?
0
DEV3 Developer Forum
Every post is reviewed first. Usually reviewed within 24 hours.
We are four developers and keep arguing about Git flow versus trunk-based development. Which branching strategy suits a small team shipping a web app?
Short answer: most small teams do well with a simple trunk-based style: one main branch that is always deployable, short-lived feature branches and pull requests. Heavier models only pay off with scheduled releases and multiple supported versions.
main is always releasable.main, tag releases.develop and main branches, plus release and hotfix branches.Essentially option 1: branch from main, open a pull request, merge, deploy.
main stays healthy.main: no direct pushes, required checks.feature/short-description, fix/short-description.git switch main && git pull
git switch -c fix/invoice-rounding
# commit changes
git push -u origin fix/invoice-rounding
# open a pull request, review, merge, delete the branch
develop branch nobody trusts.Choose the lightest model that matches how you release, write it down in one page and revisit it if releases change.