Chapter 1. Introduction: What Is Trunk-Based Development?
Software development often goes wrong. And it can be bad. Sometimes really bad. But there are things you can do that not only make it less bad but actually make it go well. And trunk-based development is one of those things. Trunk-based development brings you better code faster and makes your developers happier. Better. Faster. Happier.
Trunk-based development (TBD) is a technique that many professionals advocate enthusiastically,1 and it’s one that I’ll argue is essential for continuous integration. But despite continuous integration being a widely known term, surprisingly few software developers have any experience with TBD. It’s also quite controversial: people can react strongly against the changes required to fully adopt TBD.
So who or what is TBD for? It’s unlikely to be appropriate for contexts such as open source projects, where often the contributors do not know one another and their collaboration occurs sporadically and over long time periods. But as long as contributors to a codebase are able to collaborate closely, TBD is very effective. It’s not a technique that can be adopted lightly: you’ll also need to learn and adopt several associated practices to reap the benefits of TBD, and if you’re not used to them, that part of it will be nontrivial. You can’t just flick a switch and turn TBD on. But the skills needed for TBD are all incredibly valuable; thus they should be viewed as benefits of, as well as prerequisites ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access