Blog post

Git Workflows That Work: Beyond main-vs-develop

The classic main-vs-develop Gitflow model is now legacy. GitHub Flow, GitLab Flow, and trunk-based development are simpler alternatives, backed by DORA data and branch automation.

Gitflow’s main-and-develop model is legacy. Atlassian says its long-lived develop branch is difficult to combine with CI/CD.

GitHub Flow: branch from main, make a focused change, open a pull request, run checks, merge, and delete the branch. GitLab Flow stays on main and adds production or environment branches only when necessary. Trunk-based development merges small batches to main daily and releases from tags.

DORA reports better delivery from teams with three or fewer active branches, daily merges, and no code freezes. The figures are from 2016/2017; the lasting lesson is to reduce branch age and batch size.

Use review and check rules, signed commits where appropriate, and a merge queue that re-tests against the latest main. Start with one workflow; add release branches only when needed. It makes failed changes easy to review and roll back fast.

The mechanism that makes any of these flows safe is branch protection. Require at least one approving review, keep checks mandatory, and block force pushes to main. A merge queue helps when many small PRs land daily: it batches them, re-runs tests against the latest main, and merges only what is green. If your team is new to this, start with GitHub Flow plus protected main and add release branches only once you actually ship from tags.

Sources: GitHub, GitLab, DORA, Atlassian.

Related What I Do

These What I Do pages are matched from the subject matter of this article, creating a cleaner path from educational content to implementation work.

Continue reading

Based on shared categories first, then the strongest overlap in tags.