Why are we so afraid of Trunk-Based Development?

Daniele Scillia (Dan The Dev)
Learn Agile Practices
2 min readApr 11, 2023

Trunk-based development (TBD) is a software development approach that involves committing code changes directly to a shared code repository, or “trunk,” rather than branching and merging code changes as is common in other approaches such as GitFlow.

Photo by Yancy Min on Unsplash

The fear of something new

Despite Trunk-based Development having amazing benefits once mastered, many developers are very afraid of adopting it.

The reasons are multiple, here are some of them:

  1. Fear of breaking the codebase: one concern with Trunk-based is that committing code changes directly to the trunk may increase the risk of breaking the codebase. This may be especially concerning for larger teams or projects with complex codebases. The fear probably comes from a history of issues during production release or the addiction to the false feeling of safety that Pull Requests gives us.
  2. Lack of understanding of the benefits: it’s hard to fully understand the benefits of Trunk-based before trying it; benefits like faster development cycle, improved code quality, no more Git conflicts, and debugging almost totally removed, are cool to say but you deeply understand how this improves your work only when you experience them.
  3. Refusing additional work: Some developers may view Trunk-based as requiring more work, as it involves continuously integrating and testing code changes rather than merging code changes in larger batches. And this is true! Working only with the master branch requires some additional coding that enables us to merge so frequently (think feature flags, for example) and some of us are not professional enough to accept that this additional work is required to have a quality outcome and will be repaid with all the reworks we are avoiding thanks to it.
  4. Resistance to change: I have to also admit that Trunk-based involves a different way of thinking about and approaching software development; it’s a complete shift in the way we think about software and plan to release it, with the same impact as the shift in using Test-Driven Development. In the end, software developers are human beings, and human beings are resistant to change by nature.

I’m not here to say that the concerns about Trunk-Based Development are not valid, they are, but this tool solves problems instead of creating new ones and the open mind that it requires to be understood is totally worth it!

Read the full article on my blog here.

--

--

Daniele Scillia (Dan The Dev)
Learn Agile Practices

Software Engineer @TourRadar - Passionate Dev, XP Advocate, passionate and practitioner of Agile Practices to reach Technical Excellence