The most common question about trunk-based development is: “What if my feature only makes sense once it’s completely finished—can I even merge it?”
My answer now: yes, merge it, but turn it off. Feature toggles or flags let you have unfinished code paths without making them active.
The biggest effect I see:
- The rest of the application has to work with the feature both on and off, so incompatibilities surface earlier.
- Tests can specifically cover both states.
- Rollout becomes controllable: by environment, by user group, through gradual activation, or manually for testers.
Another often-underestimated benefit: release and deployment become two different things. If I can control when a feature is activated, I can deploy the code independently of the feature going live. Deployment thus becomes a purely technical process. The actual release can then be tied to testing maturity or business requirements, such as campaigns, support capacity, or market feedback.
Since I started working this way, I’ve found it to be a massive productivity boost.
Do you use feature flags? What was the biggest stumbling block for your team when getting started with feature toggles?