CS FundamentalsModerateProduct-company DevOps interview

A team practising trunk-based development wants to merge a half-built feature into main daily without exposing it to users. What makes this work?

  1. A. A long-lived feature branch merged at the end of the quarter
  2. B. Feature flags (toggles) that keep the incomplete code path switched off in production
  3. C. Committing the code commented out
  4. D. Tagging each commit as beta

Correct answer: B. Feature flags (toggles) that keep the incomplete code path switched off in production

Feature flags decouple deployment from release: the code ships but stays dark until the flag is turned on, avoiding long-lived branches and painful merges. The flags themselves must later be removed to avoid debt.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic