AZ-400 Practice Question: Design and implement a source control strategy
Your organization uses Azure Repos and wants to implement a Git branching strategy that supports continuous delivery with hotfix capabilities. Which THREE practices should be part of the strategy?
⚠ Common exam trap
The trap is confusing the hotfix branching model with the incorrect practice of merging hotfixes directly to develop and cherry-picking to main. Hotfix branches should be created from main (the production branch) so the fix is based on the latest production code, and the fix should be merged into both main and develop to ensure it is not lost in subsequent development.
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
✓
Release branches are used to stabilize a release before merging to main.
Option B is correct because release branches let you stabilize and harden a release (final testing, version bumps, minor fixes) in isolation while main continues to receive new work, which is essential for continuous delivery. Option C is correct because keeping main always in a deployable state is the core invariant of a CD-oriented branching strategy, enabling any commit on main to be released at any time. Option E is correct because hotfix branches must be cut from main (the production-ready line), fixed, then merged back into main for immediate release and also merged into develop so the fix is not lost in ongoing development. Option A is wrong because long-lived feature branches cause merge conflicts and delay integration, contradicting continuous delivery's need for short-lived branches and frequent merges. Option D is wrong because merging hotfixes directly into develop and cherry-picking to main inverts the correct flow and risks divergence, since the hotfix should originate from main and be propagated to both main and develop.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Feature branches have long lifetimes and are merged to main only after full feature completion.
Why it's wrong here
Long-lived feature branches accumulate merge conflicts and delay integration, making the main branch unstable and hindering continuous delivery. Merging only after full completion also means the main branch is not always deployable, violating core CD principles.
- ✓
Release branches are used to stabilize a release before merging to main.
Why this is correct
Release branches allow final testing, bug fixes, and version tagging without disrupting ongoing development on main, ensuring the release is production-ready before main integration. This stabilizes the release while keeping main available for concurrent feature work.
- ✓
Main branch is always in a deployable state.
Why this is correct
Keeping main continuously deployable is the foundation of continuous delivery: every commit merged to main can be released automatically. It also lets hotfix branches fork from main and merge back without waiting for unfinished develop work.
- ✗
Hotfixes are merged directly to develop and then cherry-picked to main.
Why it's wrong here
This delays the hotfix deployment to production, as it must go through develop and may bypass the release process. Hotfixes should be based on the production version (main) for immediate deployment, not routed through develop first.
- ✓
Hotfix branches are created from main and merged back into main and develop.
Why this is correct
Hotfixes branch from main because main holds production code, then merge back to main for immediate release and into develop so the fix is not lost in the next release. This dual merge keeps continuous delivery intact while enabling urgent corrections.
Go deeper
Related to this question
Learn chapter
Implementing Work Item Management and Agile Planning
Key term
Feature
A feature is a distinct unit of functionality that delivers value to the user, often managed and tracked throughout the software development lifecycle.
Key term
cut
In scripting and automation, cut is a command-line utility used to extract specific fields or columns from each line of a file or text stream based on a delimiter or character position.
About these practice questions
One of 696 original AZ-400 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.