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?
- A. A long-lived feature branch merged at the end of the quarter
- B. Feature flags (toggles) that keep the incomplete code path switched off in production
- C. Committing the code commented out
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- You have 2 local commits on main and the remote main has 3 new commits. What does git pull --rebase do?
- You staged changes to app.py with git add but now want them out of the next commit while keeping the edits in your working tree. Which…
- During git rebase main, a conflict stops the rebase. You edit the file to resolve it. What should you do next?
- After git fetch, git status says: "Your branch is behind 'origin/main' by 3 commits, and can be fast-forwarded." Which statement is correct?
- A repository has untracked files temp.txt and out/build.log; .log is in .gitignore. What does git clean -fd remove?
- Assertion (A): You should not rebase commits that others have already based work on. Reason (R): Rebasing creates new commits with new…