CompTIA Cloud+ (CV0-004)DevOps FundamentalsMedium
A development team wants to avoid long-lived feature branches and instead have all developers commit small, frequent changes directly into the main branch, often multiple times per day, keeping any temporary branches alive for only a few hours. Which branching practice does this describe?
- ARelease branching
- BGitFlow branching
- CFork-based workflow
- DTrunk-based development
Show answer & explanationAnswer & explanation
Correct answer: D. Trunk-based development
Trunk-based development emphasizes frequent, small commits directly to a shared main branch (trunk) with minimal branch lifespan, supporting continuous integration. GitFlow and release branching rely on longer-lived branches for features and releases, and fork-based workflows are typically used in open-source projects with separate repository copies.
Why the other options are wrong
- A. Release branching isolates release preparation in its own long-lived branch.
- B. GitFlow defines multiple long-lived branches (develop, feature, release, hotfix).
- C. Fork-based workflows involve separate repository copies, common in open-source contribution models.
Trunk-Based Development
A branching strategy where developers integrate small, frequent changes directly into a shared main branch, keeping feature branches short-lived to support continuous integration.
- Branches (if used) live hours, not weeks
- Reduces merge conflicts through frequent integration
- Pairs well with feature flags for incomplete work
Memory trick: Trunk-based: everyone plants back into the same tree trunk daily.