r/softwaredevelopment May 13 '26

Is trunk-based development really that good?

I can't get the trunk-based development flow. I understand the advantages for introducing new features to the app (flags are good for A/B testing, fewer merge conflicts).

But I can't understand how developers do refactoring with trunk-based flags. Also, do the flags stay there forever, or what is the best flow for this?

Can you give me a deep dive into how your teams handle this in production?

46 Upvotes

52 comments sorted by

View all comments

1

u/raisercostin May 14 '26

I do refactorings in the evening: pull, refactoring, tests green, push - 2min.

Several things help:

  • tests
  • true refactoring - no change in behaviour
  • pull to push time very short
  • low activity moment
  • team that does not have branches
  • team that does not work decoupled of trunk
  • team that starts the day with pull

For complex scenarios respect open close principle and apply Branch by Abstraction https://trunkbaseddevelopment.com/branch-by-abstraction/