By Abdelrahman Saed — Senior Mobile Engineer. Last updated: 2026-08-10.
Trunk-based development is a source control strategy where all developers commit frequently to a single shared branch (the trunk, usually master or main). Feature branches are short-lived (hours to a day or two) and merge back immediately, rather than living for weeks as in GitFlow.
In trunk-based development, the master branch is always deployable. Engineers create short-lived branches, make small changes, and merge quickly:
master: ──●──●──●──●──●──●──●──●──●──●──
\ / \ / \ /
feature: ●● ●● ●●
Key practices:
1. Short-lived branches — a branch lives for hours or a day, not weeks. If a feature takes longer, it ships dark behind a feature flag. 2. Small commits — merge one logical change at a time, not a month of work. 3. Branch protection — master rejects direct pushes; every merge goes through CI gates. 4. Feature flags — incomplete work merges dark behind a flag and ramps when ready.
At iStoria, trunk-based development is what let us cut the release cycle from four weeks to one. Engineers merge multiple times per day into a protected master, and a suite of 14 GitHub Actions workflows keeps the trunk green:
master rejects direct pushes (even from the lead).Use trunk-based development when:
Use GitFlow instead when:
Trunk-based development merges everything to one branch frequently with short-lived feature branches. GitFlow uses long-lived feature branches and dedicated release branches. Trunk-based enables faster releases (days/weeks); GitFlow suits slower, multi-version release cycles (months).
Feature flags let you merge unfinished code dark — the code is in master but gated behind a flag that defaults to off. When the feature is ready, you enable the flag remotely (via GrowthBook, Firebase Remote Config, etc.) without a new release. This decouples deploy from release.
Available for hire. Abdelrahman Saed is a Senior Mobile Engineer (Flutter) — open to full-time, fractional, contract, or advisory work. Hire me →
Book a 20-minute call · Download the CV (PDF) · See how I work