Two branching styles dominate. In trunk-based development, everyone merges small changes to one main branch at least daily. With feature branches, work lives on a branch until a feature is complete.
Comparison
| Trunk-based | Long feature branches | |
|---|---|---|
| Merge size | Small | Large |
| Conflicts | Few, early | Many, late |
| Release control | Feature flags | Branch merges |
| Review | Frequent, small | Infrequent, large |
| Fit with agents | Good | Risky |
Why agents push towards short branches
- Agents write quickly, so a branch can drift far from main in a day.
- Large diffs are hard to review.
- Several agents working at once make conflicts likelier.
A middle path
- One issue per branch, merged within a day or two.
- Use feature flags for work that takes longer.
- Rebase or merge main into the branch daily.
- Protect main with required checks and a review.
See feature flags for agent changes, small pull requests and git worktrees.