In trunk-based development everyone integrates into one branch, the trunk (main), at least once a day. Branches live for hours, carry one small change and are deleted on merge; unfinished features ship dark, behind a feature flag. Google's DORA research, which found the practice in its highest-performing teams, sets three measurable criteria: three or fewer active branches, merges into trunk at least daily, and no code freezes or integration phases.
A branch's age is less telling than its drift. %(ahead-behind:main) (Git 2.41 1,932 ) counts, for every branch, the commits it has that main lacks and the commits it is missing:
git for-each-ref --format='%(refname:short) %(ahead-behind:main)' refs/heads
git branch --merged main
git branch -d dev-docs && git push -q origin --delete dev-docsdev-docs 0 25 experiment/covers 4 13 main 0 0 release/1.1 2 21 dev-docs * main Deleted branch dev-docs (was 471ce3b).
dev-docs has nothing main lacks (it was merged in Tags and Releases), so it goes, on the server too. experiment/covers is 13 commits behind, and each day adds to the conflicts waiting for it; release/1.1 is a deliberate exception (Release and Hotfix Branches). The practice leans on tests rather than branches: when every change reaches main within hours, fast automated tests and continuous integration (GitHub) keep main releasable.