How I Learned to Stop Worrying And
🐘Love the Trunk🐘
Or...
Dave Anderson
Requires good development practices
Drives Continuous Integration
Facilitates Continuous Deployment and Lean Experimentation
A source-control branching model, where developers collaborate on code in a single branch called ‘trunk’ *, resist any pressure to create other long-lived development branches by employing documented techniques, avoid merge hell, do not break the build, and live happily ever after.
-trunkbaseddevelopment.com
🌳 *AKA master
📚In contrast to Gitflow or branch-per-feature workflows..
✍️✍️✍️Commit directly on master (AKA trunk) with small and frequent changes
🕑Create short lived branches for the purposes of code review or CI runs
❌Promptly delete them when they are no longer needed (1-2 days, not weeks)
🛣️Small & frequent commits minimize merge conflicts, even for deeper refactors
✔️🔍Each commit is atomic and includes tests that are run before merge, both locally and by CI
❌↩️If tests fail, the work can be automatically rolled back so others can continue to work while a fix is pursued.
🔀Avoid painstaking merges
✨Encourage refactors on the go
⏩Changes quickly made available for use and review by stakeholders and team members
🔁Shorten feedback loop to make bug fixes and tweaks
🌌Avoid scope creep and big bang releases
😌Less cognitive load - get things DONE DONE quicker
🙋♀️🙋♂️Pair programming also provides a mechanism for quick feedback and review of code and is often used rather than a Pull Request
🔀Avoid painstaking merges
✨Encourage refactors on the go
⏩Changes quickly made available for use and review by stakeholders and team members
🔁Shorten feedback loop to make bug fixes and tweaks
🌌Avoid scope creep and big bang releases
😌Less cognitive load - get things DONE DONE quicker