AZ-400 Merge commit (no fast-forward) Practice Question
Which THREE are valid Git merge strategies available in Azure Repos pull requests?
⚠ Common exam trap
Candidates often mistakenly believe that only two merge strategies are available or confuse 'Squash merge' as a non-strategy, but it is a valid completion option in Azure Repos.
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
✓
Semi-linear merge
Among the given options, the valid merge strategies are: 'Merge commit (no fast-forward)' (Option B), 'Semi-linear merge' (Option A), and 'Squash merge' (Option D). 'Merge commit (no fast-forward)' preserves the full history of both branches. 'Semi-linear merge' rebases the source branch onto the target before creating a merge commit, ensuring linear history. 'Squash merge' combines all source branch commits into a single commit on the target. Note that Azure Repos also supports 'Rebase and fast-forward' as a valid merge strategy, but it is not among the options. Options C and E are not valid merge strategies in Azure Repos pull requests.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Semi-linear merge
Why this is correct
Semi-linear merge first rebases the source branch onto the latest target branch and then creates a merge commit, combining the benefits of a clean linear history with an explicit merge point. This strategy is valid in Azure Repos and is also known as 'rebasing before merging'.
- ✓
Merge commit (no fast-forward)
Why this is correct
Merge commit (no fast-forward) always creates a merge commit for every pull request, preserving the complete commit history and branch topology of the source branch. This strategy makes it easy to see exactly when and where changes were integrated into the target branch.
- ✗
Fast-forward only
Why it's wrong here
Fast-forward only is not exposed as a standalone completion strategy in Azure Repos pull requests. A pure fast-forward simply moves the target branch pointer to the source branch's latest commit, which is only possible when the source branch contains the target branch's history as a subset; otherwise, a merge or rebase step is required. Azure Repos instead offers 'Rebase and fast-forward' as an explicit strategy that first replays source commits onto the latest target before doing the fast-forward, and the semi-linear merge method rebases then creates a merge commit. Because a raw fast-forward option would silently skip an integration record and cannot be applied when branches diverge, it is not offered as a separate pull request completion choice in Azure Repos.
- ✓
Squash merge
Why this is correct
Squash merge consolidates all commits from the source branch into a single new commit on the target branch, resulting in a simplified, linear history. While this discards the individual commit granularity, it keeps the target branch clean and is a valid merge strategy in Azure Repos.
- ✗
Rebase only
Why it's wrong here
Rebase only is not a valid standalone merge strategy in Azure Repos; rebasing is performed as an internal step within the semi-linear merge strategy. Azure Repos does not offer a separate 'rebase only' completion option for pull requests, so this selection is incorrect.
Go deeper
Related to this question
Learn chapter
Introduction to DevOps and Azure DevOps
Key term
Git
Git is a version control system that tracks changes to files so multiple people can work on the same project without overwriting each other's work.
Key term
Azure Repos
Azure Repos is a set of version control tools that allow teams to manage their source code, track changes, and collaborate on software projects using Git or Team Foundation Version Control (TFVC) within the Microsoft Azure ecosystem.
About these practice questions
One of 823 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.