Git Academy

Advanced · 6 min read

Branching strategies

Trunk-based, GitHub Flow, Git Flow: which one for your team?

GitHub Flow

main is always deployable. One short branch per change, a pull request, merge, deploy. Simple and enough for most web projects.

Trunk-based development

Everyone integrates into main several times a day, unfinished features hidden behind feature flags. Needs good tests and CI.

Git Flow

main + develop + feature/, release/, hotfix/ branches. Useful for software with versioned releases (apps, libraries), heavy for continuously deployed sites.

Whatever you choose

Short-lived branches, protected main, mandatory review, CI on every pull request. Most Git disasters come from long branches nobody merged.