Courseiva

AZ-400 · topic practice

Design and implement a source control strategy practice questions

This domain covers how you choose and enforce branching, repository, and trigger strategies in Azure Repos and GitHub, then wire them into Azure Pipelines. Questions are scenario-based: pick the right trigger, workflow, or repo layout for a stated team size, migration, or monorepo constraint, and justify it against alternatives.

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 a source control strategy

What the exam tests

What to know about Design and implement a source control strategy

Be able to pick and configure the right trigger, branching workflow, and branch policy for a given scenario in Azure Repos or GitHub. The single most important thing: match the trigger type to the event — PR validation uses branch policy build validation, not a plain CI trigger.

Selecting PR triggers (branch policy build validation vs. CI triggers on main) in Azure Pipelines YAML

Choosing Git branching workflows (feature, trunk-based, GitFlow, release) to reduce merge conflicts during TFVC migration

Configuring path filters and pipeline triggers so monorepos build only changed projects

Applying branch policies: required reviewers, build validation, linked work items, comment resolution, merge strategy

Watch out for

Common Design and implement a source control strategy exam traps

  • ▸Confusing a pull request trigger with a CI trigger on the target branch; PR validation needs a branch policy build, not just a trigger.
  • ▸Assuming GitFlow suits small teams doing continuous delivery; it adds long-lived branches and merge overhead that trunk-based avoids.
  • ▸Forgetting path filters in monorepo pipelines, so every commit rebuilds all projects and wastes agent time.

Practice set

Design and implement a source control strategy questions

20 questions · select your answer, then reveal the explanation

You are reviewing a webhook payload from Azure Repos. The payload indicates that a new branch named 'feature-123' was created. Which event type triggered this webhook?

Exhibit

Refer to the exhibit.
```json
{
  "branch": "refs/heads/feature-123",
  "before": "0000000000000000000000000000000000000000",
  "after": "abc123def456abc123def456abc123def456abc1",
  "commits": [
    {
      "id": "abc123def456abc123def456abc123def456abc1",
      "message": "Add new feature"
    }
  ]
}
```

You see the above git log output. The team has a policy requiring linear history on the main branch. Which command should be used next time to integrate the feature branch?

Network Topology
$ git logonelinegraphallRefer to the exhibit.```bash|/* 9a8b7c6 Initial commit```

Which THREE are best practices for managing secrets in GitHub Actions workflows?

Your team uses GitHub and wants to automate the creation of a new release branch (e.g., release/v1.2.3) whenever a tag starting with 'v' is pushed. Which GitHub Actions trigger should you use?

Your team uses GitHub and wants to enforce a policy that all commits to the main branch must be signed with a GPG key that is associated with the author's GitHub account. Which method should you use to enforce this?

Your company has multiple teams working on a monorepo in Azure Repos. You need to enforce that changes to the /src/api folder require approval from the API team, while changes to /src/web require approval from the Web team. Which branch policy feature should you use?

Your organization uses GitHub Enterprise and wants to prevent secrets (e.g., API keys) from being pushed to any repository. Which GitHub feature should you enable?

Your team uses GitHub and wants to prevent direct pushes to the main branch. Only pull requests with at least one approval should be allowed to merge. Which GitHub feature should you use?

You are designing a source control strategy for a global team of 200 developers working on a single large .NET solution. The solution takes 45 minutes to build. You need to reduce build times and enable independent versioning of components. What should you do?

Your team uses Git with Azure Repos. You notice that the commit history on the main branch contains many merge commits and commit messages like 'fix merge conflict'. You want a linear history for better traceability. What should you change?

You work for a multinational company that uses Azure Repos. The compliance team requires that all code changes include a work item reference in the commit message. What is the most effective way to enforce this?

Your organization is migrating from Azure Repos to GitHub. You have 200 repositories with complex branching strategies and build policies. You need to preserve the commit history and branch policies. What is the best migration approach?

You are designing a source control strategy for a team that uses GitHub Copilot. The team wants to ensure that code suggestions do not include sensitive data. Which approach should you recommend?

Your team uses GitHub and wants to automatically close stale branches that have not been updated in 90 days. Which GitHub feature should you configure?

Your company uses Azure Repos with a Git branching strategy that includes a main branch, a develop branch, and feature branches. You need to enforce that only designated release managers can merge changes from develop into main, while developers can create feature branches off develop and merge pull requests into develop. What is the best way to implement this?

Your team uses a monorepo in Azure Repos containing multiple projects. You want to set up CI/CD so that only the projects affected by a commit are built and deployed. Which approach should you use?

Your organization uses GitHub Advanced Security. A developer accidentally committed a file containing production database connection strings to a feature branch. The push was not yet merged into main. What is the best way to remove the secrets from the branch history while minimizing disruption?

Your organization needs to enforce that every commit to the main branch in Azure Repos is associated with a work item from Azure Boards. What should you configure?

Your team is migrating from TFVC to Git in Azure Repos. Which TWO actions should you take to ensure a smooth migration?

Your GitHub organization has multiple repositories that share common CI/CD workflows. You want to centralize these workflows to reduce duplication. Which TWO approaches are valid?

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 a source control strategy sessions

Start a Design and implement a source control strategy only practice session

Every question in these sessions is drawn from the Design and implement a source control strategy 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 a source control strategy?
Be able to pick and configure the right trigger, branching workflow, and branch policy for a given scenario in Azure Repos or GitHub. The single most important thing: match the trigger type to the event — PR validation uses branch policy build validation, not a plain CI trigger.
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 a source control strategy questions in a focused session?
Yes — the session launcher on this page draws every question from the Design and implement a source control strategy 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.