Courseiva

AZ-400 · topic practice

Design and implement source control practice questions

This domain covers Git and Azure Repos source control in Azure DevOps: branching, pull request policies, merge strategies, path filters, and monorepo build validation. Questions test configuring branch policies, choosing merge types, scoping builds to folders, and ordering troubleshooting steps for failed release pipelines.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Design and implement source control

What the exam tests

What to know about Design and implement source control

Be able to configure Azure Repos branch policies, apply path filters for monorepo build validation, and pick the correct Git merge strategy per pull request. The single most important thing: know how branch policies and path filters combine to control when builds and reviews are required before merge.

Configuring Azure Repos branch policies: required reviewers, build validation, and status checks before merge

Using path filters in build validation policies to trigger builds only for specific monorepo folders

Selecting Git merge strategies in Azure Repos pull requests: merge commit, squash, rebase and fast-forward

Troubleshooting failed Azure DevOps release pipelines by inspecting logs, stages, and deployment gates

Watch out for

Common Design and implement source control exam traps

  • ▸Assuming build validation always triggers on every commit; without path filters it runs regardless of which folders changed
  • ▸Confusing squash merge with rebase: squash creates one new commit, rebase replays commits and rewrites history
  • ▸Believing required reviewers block merges automatically; policy enforcement depends on branch policy scope and bypass permissions

Practice set

Design and implement source control questions

20 questions · select your answer, then reveal the explanation

A team uses a monorepo with multiple projects in one Git repository. They want to enforce that each commit message must reference a work item from Azure Boards. Which branch policy should they configure?

An organization has multiple Git repositories. Developers often forget to update the repository README file after making changes. What is the most effective way to ensure the README is always up-to-date?

A team uses Git-LFS to store large binary files. They observe that cloning the repository takes a long time because Git-LFS files are downloaded. How can they improve clone performance?

Question 4hardmultiple choice
Open the full VLAN trunking answer →

You are a DevOps engineer for a company developing a mobile application. The source code is stored in Azure Repos (Git). The team uses trunk-based development with short-lived feature branches. Recently, developers have reported that their feature branch builds are taking over 30 minutes, whereas the main branch builds complete in under 10 minutes. The pipeline is defined in a YAML file and includes steps to restore NuGet packages, compile, run unit tests, and perform code analysis. The pipeline also publishes build artifacts. The main branch has a branch policy that requires a successful build before merging. The feature branches do not have branch policies. All builds run on Microsoft-hosted agents. Upon investigation, you notice that the feature branch builds are restoring all NuGet packages from scratch each time, while main branch builds use cached packages. Additionally, the code analysis tool is scanning the entire codebase, not just the changed files. You need to reduce the feature branch build time to under 15 minutes without compromising code quality. Which course of action should you take?

Your team manages a large monorepo in Azure Repos containing multiple microservices. The repository has grown to over 10,000 files and 500 MB. Developers report that cloning and fetching operations are slow, often taking more than 10 minutes. Additionally, the CI pipeline triggers on every push to any branch, causing long queue times. You need to improve the developer experience and CI efficiency without splitting the repository. What should you do?

Refer to the exhibit. A developer attempts to push a commit directly to the main branch of FabrikamWeb repository but receives a push rejection. What is the most likely reason?

Network Topology
az repos listproject "Fabrikam"output tablerepository-id 87654321-4321-4321-4321-210987654321az repos policy listID Name Default Branch12345678-1234-1234-1234-123456789abc FabrikamMobile main87654321-4321-4321-4321-210987654321 FabrikamWeb develop1 MinimumNumberOfReviewers True True2 CommentRequirements True True3 MergeStrategyRequirements True True

Refer to the exhibit. A developer is working on the feature/login branch and wants to ensure that the latest changes from main are incorporated before creating a pull request. Which command should the developer run next?

Network Topology
git logonelinegraphall* | 1j2k3l4 Fix validation|/* 5m6n7o8 Initial commit$ git statusOn branch feature/login

Refer to the exhibit. A developer pushes a commit to a branch named 'feature/new-login'. Which of the following will occur?

Exhibit

# Azure DevOps pipeline YAML snippet
trigger:
  branches:
    include:
      - main
      - release/*
    exclude:
      - feature/*

pool:
  vmImage: 'ubuntu-latest'

steps:
- script: echo Hello, world!
  displayName: 'Run a one-line script'

- task: DotNetCoreCLI@2
  inputs:
    command: 'restore'
    projects: '**/*.csproj'

- task: DotNetCoreCLI@2
  inputs:
    command: 'build'
    projects: '**/*.csproj'

- task: DotNetCoreCLI@2
  inputs:
    command: 'test'
    projects: '**/*.csproj'

Refer to the exhibit. A developer sees this error when running a YAML pipeline in Azure DevOps. What is the most likely cause?

Exhibit

Error from Azure DevOps pipeline:
##[error]No hosted parallelism has been purchased or granted. To request a free parallelism grant, please fill out the following form https://aka.ms/azpipeline-parallelism-request
##[error]The remote provider was unable to process the request. Please try again later.

You are a DevOps engineer at a company that uses Azure Repos Git. A security audit found that secrets were committed to the repository history. You need to remove the secrets from all past commits and prevent future pushes containing secrets. Which two actions should you perform? (Choose two.)

A development team uses a forking workflow in Azure Repos. They want to ensure that only specific users can create forks of the main repository. How can they achieve this?

A team uses Git for source control. They want to automatically squash all commits in a feature branch into a single commit when merging to the main branch. Which merge type should they use?

A company has a policy that all code changes must be reviewed by at least two people. However, for urgent bug fixes, they want to allow a single reviewer. How should they configure the branch policy?

A developer accidentally committed a sensitive password to a Git repository. The commit has already been pushed to the remote. What is the first step to remediate the situation?

A team is migrating from TFVC to Git. They have a large codebase with many branches. What is the recommended approach to preserve the history during migration?

Which TWO branch policies can be configured in Azure Repos to enforce code quality?

Which THREE are benefits of using a monorepo vs multiple repositories?

Which THREE are valid Git merge strategies available in Azure Repos pull requests?

You are a DevOps engineer at a company that develops a cloud-based SaaS application. The application consists of multiple microservices, each stored in its own Git repository within a single Azure DevOps project. The team has grown rapidly, and developers frequently need to make changes that span multiple services. They often complain about the overhead of managing multiple pull requests and coordinating merges across repositories. To improve efficiency, the team lead suggests consolidating all microservices into a single monorepo. However, the lead architect is concerned about the impact on build times, as the CI pipeline currently builds each service independently. You are tasked with designing a source control strategy that reduces cross-repository coordination overhead while maintaining fast, independent builds. You propose using a monorepo with a structure that allows selective building. Which approach should you recommend?

You are a DevOps consultant for a financial services company that is migrating from TFVC to Git. The existing TFVC repository has several branches: main, dev, feature branches, and release branches. The history is linear with no branching. The company requires that all future Git commits follow a strict naming convention: 'type(scope): description' (e.g., 'feat(api): add new endpoint'). They also want to prevent direct commits to the main branch; all changes must go through pull requests with at least one reviewer. Additionally, they want to ensure that each commit message is validated before it is merged. The team is small (5 developers) and they want a simple setup without complex tooling. Which approach should you recommend?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Design and implement source control sessions

Start a Design and implement source control only practice session

Every question in these sessions is drawn from the Design and implement source control domain — nothing else.

Related practice questions

Related AZ-400 topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the AZ-400 exam test about Design and implement source control?
Be able to configure Azure Repos branch policies, apply path filters for monorepo build validation, and pick the correct Git merge strategy per pull request. The single most important thing: know how branch policies and path filters combine to control when builds and reviews are required before merge.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Design and implement source control questions in a focused session?
Yes — the session launcher on this page draws every question from the Design and implement source control domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other AZ-400 topics?
Use the topic links above to move to related areas, or go back to the AZ-400 question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the AZ-400 exam covers. They are not copied from any real exam or dump site.