Design and implement a source control strategy
Drill 12 practice questions focused entirely on Design and implement a source control strategy for the Microsoft AZ-400 exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.
Your team uses Azure Repos with a protected 'main' branch. A branch policy requires a successful build validation before a pull request can complete. Developers complain that trivial documentation-only changes (Markdown files under a /docs folder) still trigger the full CI build, delaying their PRs. You must reduce unnecessary build runs for documentation-only changes while keeping the build validation policy enforced for all code changes. What should you configure?
Your team uses pull requests targeting the main branch in Azure Repos. A branch policy requires a minimum of two approvals. Reviewers frequently approve a PR, and then the author pushes additional commits that change the code substantially before merging. Auditors have flagged that approvals granted on earlier code are being carried forward to the final merged code. You must ensure that any new commit pushed to the source branch invalidates existing approvals so reviewers must re-review the latest changes. Which branch policy configuration should you enable?
Your team uses Azure Repos with a pull-request workflow targeting the main branch. A third-party static analysis SaaS tool runs against every PR and posts results back to Azure DevOps by calling the Status API on the pull request. Leadership now requires that a PR cannot be completed unless this external tool reports a successful status, and the requirement must survive even if the tool is temporarily slow to respond. Which branch policy configuration meets this requirement?
Your team maintains a public open-source library in Azure Repos. External contributors must be able to propose changes without gaining write access to the main repository, while your internal maintainers need full control over what merges into the default branch. You also want CI validation to run automatically on every proposed change before a maintainer reviews it. Which approach best satisfies these requirements?
A developer accidentally committed a file containing production database credentials to the main branch of an Azure Repos Git repository three weeks ago. Several commits have been made since, and the branch is shared by 12 team members. Security requires that the secret be completely removed from the repository history, not just the latest commit. Which action correctly removes the sensitive data from all history?
Your team uses Azure Repos with a Git repository named 'payments-core'. Release engineers create annotated tags such as 'v2.4.0' to mark production builds, and these tags must be immutable for audit compliance. Recently, a developer accidentally deleted the tag 'v2.3.0' and pushed a new tag with the same name pointing to a different commit. You must prevent any user other than the 'Release Managers' group from creating, editing, or deleting tags, while still allowing all contributors to push commits to branches. What should you configure?
Your team uses Azure Repos with Git. Leadership requires that no code reaches the 'main' branch without at least two reviewers, all comments must be resolved, changes must be traceable to a work item, and the CI build must pass before merging. Developers must not be able to push commits directly to 'main'. Which combination of Azure Repos branch policies on 'main' best satisfies all these requirements?
Your game development team stores large binary assets (textures, 3D models, and video files, often 100 MB to 2 GB each) in an Azure DevOps Git repository. Developers report that cloning the repository takes hours and consumes excessive disk space because every historical version of each binary is downloaded. You must reduce clone times and storage bloat for these binary files while keeping them under version control. What should you implement?
A team's Azure Repos Git repository has grown to several gigabytes because designers have committed large .psd and .png files directly into history for the past two years. Cloning now takes over 20 minutes. The team wants to move these existing binary files (including all historical versions) into Git LFS so future clones only download the LFS pointers and current blobs. Which approach correctly converts the existing history to use Git LFS?
A developer at your company accidentally deleted a feature branch named 'feature/payments' in an Azure Repos Git repository. The branch contained several unmerged commits that were pushed to the remote before deletion. The developer does not have the commit SHA and no local clone with the branch still exists. As the DevOps engineer, what is the fastest supported way to restore the branch with its commits in Azure DevOps?
Your team maintains a very large Git monorepo in Azure Repos that is over 200 GB with hundreds of thousands of files. Developers report that cloning and running everyday Git commands (status, checkout) is extremely slow because they only work in a small subset of directories. You want to improve local performance without splitting the repository. Which approach should you implement?
Your team ships a customer-facing web service and deploys to production multiple times per day. Developers integrate small changes directly into a single main branch behind feature flags, and every commit to main triggers CI and automated deployment. Recently, a critical production bug requires a fix that must ship immediately while a large in-progress feature (already merged behind a disabled flag) must NOT be released. Which approach best preserves your current branching strategy while safely shipping the fix?
More AZ-400 practice
Keep going with the other Microsoft DevOps Engineer Expert domains, or take a full timed mock exam.
← Back to AZ-400 overview