Skip to content
RED SAGSkills
easyDevOps Engineer interview question

Compare trunk-based development with GitFlow. Which would you choose for a team that deploys several times a day, and why?

What the interviewer wants to hear

  • Trunk-based uses short-lived branches merged to main at least daily
  • GitFlow uses long-lived develop, release and hotfix branches
  • Frequent deploys favour trunk-based with feature flags
  • Branch protection, required reviews and CI checks on main
  • GitFlow can suit versioned products with scheduled releases

Model answer

Trunk-based development means everyone works on small, short-lived branches and merges into main at least once a day, so integration happens continuously and merge conflicts stay small. Unfinished work is merged behind feature flags. GitFlow adds long-lived develop and release branches plus hotfix branches, which gives structure for products that ship numbered releases on a schedule, but it delays integration and makes merges bigger. For a team deploying several times a day I would choose trunk-based development. Main is protected: changes come through pull requests with review and required CI checks, and every merge to main produces a deployable artifact. Feature flags separate deploying code from releasing a feature, so we can turn things off without a rollback. If we support old versions for customers, I would add short-lived release branches cut from main only for those versions.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy DevOps Engineer questions