Courseiva
Design and implement a source control strategymediumMultiple ChoiceObjective-mapped

AZ-400 Practice Question: Design and implement a source control strategy

Your team uses a monorepo in Azure Repos with multiple feature branches. You notice that merge conflicts frequently occur because developers are working on the same files. You want to reduce conflicts and improve collaboration. Which branching strategy should you recommend?

⚠ Common exam trap

A common mix-up: candidates choose GitFlow (Option D) because it is a well-known structured model, but they fail to recognize that its long-lived feature branches directly cause the merge conflicts described in the scenario.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use trunk-based development with feature flags to merge small, frequent changes.

Trunk-based development with feature flags is the correct approach because it encourages developers to merge small, frequent changes into the main branch, reducing the surface area for conflicts. Feature flags allow incomplete features to be hidden in production, enabling continuous integration without requiring long-lived feature branches. This strategy directly addresses the problem of frequent merge conflicts by minimizing divergence between branches.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use release branches for each deployment and cherry-pick commits from main.

    Why it's wrong here

    Release branches cherry-picked from main create divergent commit histories, because each release branch receives only selected commits while main continues to evolve, so the same fix is applied in different contexts and often needs re-application or conflict resolution when the release branch is eventually merged back. Duplicate patches and context-switching overhead arise since developers must remember which commits have been cherry-picked to each branch and track whether the version present on main matches the release. Moreover, even though release branches might seem short-lived, they remain long-lived in practice for each deployment horizon, and their simultaneous modification of shared files leads to merge conflicts that still require manual reconciliation with main, violating the continuous integration principle that everyone integrates frequently.

  • Use trunk-based development with feature flags to merge small, frequent changes.

    Why this is correct

    Trunk-based development with feature flags enables developers to merge small, frequent changes directly into the trunk behind a flag, keeping branches short-lived and integration burden low, which minimizes merge conflicts and supports continuous integration and delivery.

  • Use a single main branch and require all changes to be committed directly.

    Why it's wrong here

    Requiring all changes to be committed directly to main eliminates review and isolation, making it easy for unvalidated work to break the build and forcing developers to resolve merge conflicts in a shared working directory with no branching safety net.

  • Use GitFlow with separate develop and release branches.

    Why it's wrong here

    GitFlow's permanent develop and release branches are long-lived, cause substantial merge conflicts when syncing back, and introduce additional ceremony that slows down frequent integration, making it less suitable for teams aiming to reduce merge conflicts and adopt continuous delivery.

Go deeper

Related to this question

About these practice questions

Courseiva writes every AZ-400 question from scratch — 823 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-400 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-400 exam.