logoalt Hacker News

dxdmyesterday at 9:07 AM2 repliesview on HN

As I understand it, trunk based development does not call for committing directly to main. It says to avoid long-lived branches for releases, whole features, etc.

There's nothing wrong with small, short-lived branches that can be quickly reviewed and merged into main.

That being said, I've been in a small team where the blessed style was to commit directly to main and do reviews "on demand". It quickly gets features deployed in a way that builds a lot of rot and debt into your project that people quickly lose a good understanding of. Then you just keep piling.

There's probably a way to get this done properly with a tiny team of very experienced and well-aligned developers; but that's usually not what you have in an environment that pushes this kind of extreme no-review-interpretation of trunk-based development.

Slow down, do reviews, avoid keeping branches open for more than a day.


Replies

jascha_engyesterday at 9:16 AM

> well-aligned developers

I think this is very key, if the development style and the direction of the project is clear, much less review and alignment is necessary.

And also

> avoid keeping branches open for more than a day

Big +1 on that, fast reviews are extremely key. Most teams I have seen often took days or even weeks to merge branches though, often because you end up waiting too long for reviews in the first place. Or because of good old bike-shedding. But also because these code reviews often uncovered uncertainties that needed longer discussions.

However usually code is easy to change, so defaulting to "just merge it" and creating followup tasks is often the cheaper approach than infinite review cycles.

show 2 replies
reverius42yesterday at 9:36 AM

> "Scaled Trunk-Based Development"

> There's nothing wrong with small, short-lived branches that can be quickly reviewed and merged into main.

I would have called this "branch based development", personally.

show 1 reply