On Trunk-Based Development

Something wild happened this morning. Bucket's CTO and co-founder, Ron '@roncohen' Cohen, who previously co-founded Opbeat and led engineering teams at Elastic, published a post on Trunk-Based Development (TBD) that hit the front page of Hacker News. People reacted... differently! "This sounds horrible — Why even use Git?" "I've never worked any other way in 20+ years..." TBD clearly is a controversial topic! Fun fact: you may already practice it. Ron wrote a follow-up post on Bucket.co to clarify some principles. Below are my key takeaways. TL,DR Trunk-Based Development != push to main You can still have code reviews and staging environments Focus on small, coherent code changes What is Trunk-Based Development? In software engineering, trunk-based development (TBD) is a strategy to manage git workflows that favours merging commits into the main branch even before the feature is fully complete, instead of the git flow that favours working on long-lived branches until features are 100% complete. Introduction to Trunk-Based Development flo merian for Bucket.co ・ Jan 30 #productivity #git #softwaredevelopment #featureflags Advanced Trunk-Based Development Principles It doesn't require pushing directly to main No, trunk-based development doesn't require pushing directly to main. While this might work in small engineering teams, code reviews remain essential for maintaining code quality. You can still use branches and pull requests (PR) while practicing TBD. You can still have code reviews and staging environments Yes, trunk-based development is compatible with multiple environments, including staging and pre-prod. You can still deploy your main branch to a staging environment for testing before pushing changes to production. Focus on small, coherent code changes Last but not least, it's all about creating coherent, small, and well-scoped code changes. This requires writing descriptive PR descriptions and breaking larger features into manageable, reviewable pieces. Wrapping up Trunk-based development (TBD) helps ship features faster. It doesn't require pushing code changes directly to main though. You can still use branches, pull requests, and code reviews. Above all, TBD is about creating small, frequent code changes. That's a wrap! If you enjoyed the read, please add some ❤️

Apr 15, 2025 - 23:21
 0
On Trunk-Based Development

Something wild happened this morning.

Bucket's CTO and co-founder, Ron '@roncohen' Cohen, who previously co-founded Opbeat and led engineering teams at Elastic, published a post on Trunk-Based Development (TBD) that hit the front page of Hacker News.

People reacted... differently! "This sounds horrible — Why even use Git?" "I've never worked any other way in 20+ years..." TBD clearly is a controversial topic!

Fun fact: you may already practice it. Ron wrote a follow-up post on Bucket.co to clarify some principles.

Below are my key takeaways.

TL,DR

  • Trunk-Based Development != push to main
  • You can still have code reviews and staging environments
  • Focus on small, coherent code changes

What is Trunk-Based Development?

In software engineering, trunk-based development (TBD) is a strategy to manage git workflows that favours merging commits into the main branch even before the feature is fully complete, instead of the git flow that favours working on long-lived branches until features are 100% complete.

Advanced Trunk-Based Development Principles

It doesn't require pushing directly to main

No, trunk-based development doesn't require pushing directly to main. While this might work in small engineering teams, code reviews remain essential for maintaining code quality. You can still use branches and pull requests (PR) while practicing TBD.

You can still have code reviews and staging environments

Yes, trunk-based development is compatible with multiple environments, including staging and pre-prod. You can still deploy your main branch to a staging environment for testing before pushing changes to production.

Focus on small, coherent code changes

Last but not least, it's all about creating coherent, small, and well-scoped code changes. This requires writing descriptive PR descriptions and breaking larger features into manageable, reviewable pieces.

Wrapping up

Trunk-based development (TBD) helps ship features faster. It doesn't require pushing code changes directly to main though. You can still use branches, pull requests, and code reviews. Above all, TBD is about creating small, frequent code changes.

That's a wrap!

If you enjoyed the read, please add some ❤️