# Configure and manage repositories for Azure DevOps and GitHub — Practice reading

Exam: AZ-401 — Designing and Implementing Microsoft Agentic DevOps Solutions (beta)
Knowledge domain: Design and implement a source control strategy (10–15%)
HTML: https://learningpathx.com/learning-path/AZ-401/learn/795

This public learning practice includes correct answers and existing explanations. Reading does not save progress or create a test.

## Question 1

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, you administer a private organization repository on GitHub.com. A former release engineer has lost all direct and team access to the repository but still has a copy of the deployment runner's SSH private key. An isolated fetch that offers only a copy of that key succeeds. The accepted key's fingerprint matches the repository deploy key labeled `nightly-fetch`. The nightly validation job fetches with a different deploy key labeled `release-fetch`, which is configured without write access.

Each job requires its own read-only credential. The deployment runner must complete a fetch using only its replacement credential before you revoke its current deploy key. Which plan removes repository access through the copied key while meeting these requirements? Choose ONE.

### Options

**A**

Register a fresh read-only deploy key for the deployment runner and verify a fetch with it. Delete the old private key from the runner and retain both original deploy-key entries.

**B**

Register a fresh read-only deploy key for the deployment runner and verify a fetch with it. Revoke `release-fetch` from the repository and retain `nightly-fetch`.

**C**

Register a fresh read-only deploy key for the deployment runner and verify a fetch with it. Revoke `nightly-fetch` from the repository and retain `release-fetch`.

**D**

Configure the deployment runner to use `release-fetch` and verify a fetch with it. Revoke `nightly-fetch` from the repository.

Correct answer: C

### Explanation

GitHub.com repository deploy keys grant access independently of a person's direct or team permissions. The successful fetch with only the copied key identifies `nightly-fetch` by fingerprint. Give the deployment runner a dedicated read-only replacement, verify that it can fetch using only that replacement, and then revoke `nightly-fetch` at the repository. The nightly validation job can still fetch with its separate read-only `release-fetch` key.

## Question 2

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a release engineer is preparing the tag v2.8.0 for an Azure Repos Git repository in Azure DevOps Services. The approved commit is 91e6c2d, and its developer signature verifies. The local HEAD points to a later commit, b347fa2\. The installed Git client supports the team's signing backend and uses the approved release key when signing is explicitly requested. Automatic tag signing is disabled. The tag name is unused locally and on origin, and the engineer has permission to create the remote tag. The release verifier requires the tag object to contain the message "Production release 2.8.0" and a valid signature from the approved release key. It also checks that the tag resolves to the approved commit. The engineer will publish only this tag after verification. Which command should the engineer use to create the tag? Choose ONE.

### Options

**A**

`sh git tag -s v2.8.0 91e6c2d -m "Production release 2.8.0" `

**B**

`sh git tag -a v2.8.0 91e6c2d -m "Production release 2.8.0" `

**C**

`sh git tag -s v2.8.0 -m "Production release 2.8.0" `

**D**

`sh git tag v2.8.0 91e6c2d `

Correct answer: A

### Explanation

The verifier checks the tag's message, its signature, and its target. C explicitly signs an annotated tag with the configured release key, records the required message, and targets the approved commit 91e6c2d. The existing developer signature authenticates the commit object. It supplies no signature for the release tag. After checking the tag signature against the approved key and confirming the target, the engineer can publish the specific tag ref refs/tags/v2.8.0 to origin using the granted tag creation permission.

## Question 3

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

A release engineer is publishing to `origin`, an Azure Repos Git repository in Azure DevOps Services. The remote `main` branch can be fast-forwarded to the local `main` tip. The release account has permission to update `main` and create any of the tags listed below. The Git CLI supports `--follow-tags`, and automatic tag following is disabled unless requested explicitly.

A ref check shows that the following three tags are the only local tags and that all three are absent from `origin`:

* `v2.4.0` is a lightweight tag at the local `main` tip.
* `rc-2.4.0` is an annotated tag at an earlier commit in the history of local `main`.
* `lab-2.4.0` is an annotated tag at a commit outside the history of local `main` and every existing remote ref.

The release engineer must use one push to advance remote `main` and create exactly one remote tag, `v2.4.0`. Which command meets both requirements? Choose ONE.

### Options

**A**

`sh git push --tags origin refs/heads/main `

**B**

`sh git push --follow-tags origin refs/heads/main refs/tags/v2.4.0 `

**C**

`sh git push origin refs/heads/main refs/tags/v2.4.0 `

**D**

`sh git push --follow-tags origin refs/heads/main `

Correct answer: C

### Explanation

The release requires two specific ref updates. The explicit branch refspec advances remote `main`, and the explicit tag refspec publishes the lightweight tag `v2.4.0`. With automatic tag following disabled, those refspecs select exactly the requested updates. `--tags` would add all three local tags, including the annotated lab tag outside the history of `main`. `--follow-tags` would add the missing annotated release-candidate tag because its commit is reachable from `main`. The lightweight release tag needs an explicit refspec in a push that uses `--follow-tags`.

## Question 4

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a release engineer is retiring `release-rc2` from an Azure Repos Git repository in Azure DevOps Services. The release clone and the build clone both use `origin` for that repository. The engineer has effective Force push permission covering the tag and can update both clones.

The engineer has already deleted the tag in the release clone. A fresh `git ls-remote --refs origin refs/tags/release-rc2` still lists it on `origin`, and `git show-ref --verify refs/tags/release-rc2` still finds it in the build clone. The build clone's fetch refspec maps only branches, and tag pruning is disabled in its configuration. The build clone also has a local-only tag named `build-baseline` that must be preserved.

Which pair of operations removes `release-rc2` from the remaining locations while preserving the other tags? Choose ONE.

### Options

**A**

Run `git push origin :refs/tags/release-rc2` from the release clone, then run `git fetch --prune --prune-tags origin` in the build clone.

**B**

Run `git push origin :refs/tags/release-rc2` from the release clone, then run `git tag -d release-rc2` in the build clone.

**C**

Run `git tag -d release-rc2` in the build clone, then run `git push origin --tags` from the release clone.

**D**

Run `git push origin :refs/tags/release-rc2` from the release clone, then run `git fetch --prune origin` in the build clone.

Correct answer: B

### Explanation

The observations show that two references remain. The first is the tag ref on `origin`, and the second is the local tag ref in the build clone. The explicit deletion refspec removes the remote tag, and the targeted `git tag -d` removes the build clone's copy. This leaves `build-baseline` in place. Verify the remote ref with a fresh remote lookup and check the local tag refs in each clone separately.

## Question 5

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a maintainer with write access completes two authorized pull request merges in a GitHub.com repository. The configured default branch is stable. The branch named main is used for integration work. PR #811 merged into main. Its description reads "Resolves #418". PR #812 merged into stable. Its description contains "Fixes #672" and "Refs #709" on separate lines. All three issues belong to this repository and were open before the merges. The PR descriptions are the only inputs to issue closure in this scenario. Immediately after both merges, which issues has GitHub closed automatically? Choose ONE.

### Options

**A**

Issues #672 and #709 only.

**B**

Only issue #418.

**C**

Only issue #672.

**D**

Issues #418 and #672 only.

Correct answer: C

### Explanation

GitHub.com applies closing keywords in a pull request description only when the PR targets the repository's configured default branch. PR #812 merged into stable, so "Fixes #672" closes issue #672\. GitHub ignores "Resolves #418" for automatic closure because PR #811 targeted main. "Refs #709" is a plain reference, so issue #709 also stays open. [GitHub Docs on linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)

## Question 6

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, you are preparing to merge pull request (PR) #184 on GitHub Enterprise Cloud at github.com. The PR targets main, the repository's default branch, and contains a commit whose message includes “Fixes #73.” Issue #73 is open in the same repository. The PR description contains no issue reference, and the issue's Development section does not list PR #184\. You can edit and merge the PR. Automatic issue closing is enabled, and the planned merge will bring the original commit into main. The release team needs PR #184 to appear in issue #73's Development section before the merge and issue #73 to close automatically when the PR merges. Which action meets both requirements? Choose ONE.

### Options

**A**

Add “Fixes #73” to a PR comment, then merge PR #184 into main.

**B**

Add “Fixes #73” to the PR description, then merge PR #184 into main.

**C**

Keep “Fixes #73” solely in the commit message, then merge PR #184 into main.

**D**

Add “Tracks #73” to the PR description, then merge PR #184 into main.

Correct answer: B

### Explanation

The release team needs two results at different points in the workflow. Adding “Fixes #73” to the description of the PR targeting main creates the link visible in the issue's Development section before merge. With automatic issue closing enabled, merging the linked PR into main closes the issue. The original commit message can also trigger closure when the commit reaches main, so a closed issue alone does not establish that a linked PR was visible before the merge. [GitHub Docs on linking pull requests to issues](https://docs.github.com/en/enterprise-cloud%40latest/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue), [GitHub Docs on automatic issue closing](https://docs.github.com/en/enterprise-cloud%40latest/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-auto-closing-issues)

## Question 7

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a release engineer reviews completed PR 214 in Azure DevOps Services. The project uses Azure Repos Git and Azure Boards. The engineer can open the work items, inspect their PR relationships, and read the pipeline test and coverage reports. The release report records two findings independently. A work item counts as linked when Azure DevOps records its relationship to PR 214\. A work item's acceptance check counts as verified when it passed on the commit produced by the merge. Work item 481 requires a check that invalid requests are rejected. Work item 482 requires a check that repeated requests create only one record. Work item 483 requires a check that updates produce an audit record. The draft report contains direct links to all three work items, and each link opens the correct item. The relationships recorded for PR 214 list only 481 and 482\. Pipeline run 917 passed all three checks on the pre-merge commit a57c18e. Run 922 tested merge commit c93be52\. Its test results show passes for the checks for 481 and 483 and a skipped result for the check for 482\. The coverage report for run 922 shows 86% line coverage. Which report entry is supported by the evidence? Choose ONE.

### Options

**A**

Linked work items: 481 and 482\. Work items with verified acceptance checks: 481, 482, and 483.

**B**

Linked work items: 481, 482, and 483\. Work items with verified acceptance checks: 481, 482, and 483.

**C**

Linked work items: 481 and 482\. Work items with verified acceptance checks: 481 and 483.

**D**

Linked work items: 481, 482, and 483\. Work items with verified acceptance checks: 481 and 483.

Correct answer: C

### Explanation

Use the recorded PR relationships for the linkage finding and the test results for the merge commit for the acceptance finding. PR 214 has recorded relationships to work items 481 and 482\. The direct link to 483 lets the reader open the item, while run 922 independently verifies its audit-record check. Run 922 also verifies the check for 481 on merge commit c93be52\. The check for 482 was skipped on that commit. Its passing result belongs to pre-merge commit a57c18e, and the 86% line coverage in run 922 describes the lines exercised by the tests that ran.

## Question 8

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

A developer uses Git 2.51 on Ubuntu in a local clone of a GitHub.com repository. The developer can install and run an executable `pre-commit` hook in the configured hooks directory. The hook returns the exit status of the command line you choose. The developer runs plain `git commit`, and Git is configured to flag trailing spaces.

Consider two cases against the same `HEAD`. In both cases, the developer stages a new line in a tracked deployment script, and all other changes are clean.

* Case 1\. The staged line has trailing spaces. The developer removes them from the working file without restaging it.
* Case 2\. The staged line is clean. The developer adds trailing spaces to it in the working file without restaging it.

Which command line makes the hook block the commit in Case 1 and allow it to continue in Case 2? Choose ONE.

### Options

**A**

`sh git diff --cached --check && git diff --check `

**B**

`sh git diff --check `

**C**

`sh git diff HEAD --check `

**D**

`sh git diff --cached --check `

Correct answer: D

### Explanation

A plain `git commit` records the snapshot in the index. `git diff --cached --check` compares that snapshot with `HEAD` and returns a nonzero status when the staged changes introduce a configured whitespace error. In Case 1, the index still holds the line with trailing spaces, so the hook stops the commit. In Case 2, the index holds the clean line, so the hook allows the commit to continue.

## Question 9

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a team is configuring Git 2.47.0 checks on developer workstations and on a self-managed server with a bare repository. Developers can push and manage hooks in their own clones. Repository administrators can install executable hooks on the receiving server. Trailing whitespace is configured as an error on both sides. A developer stages a line with trailing whitespace, then fixes the working copy without staging the fix. A normal commit should fail locally. The server must also reject every ref update in a push if any commit newly added to an updated branch introduces trailing whitespace, even when a developer bypasses the local check. In one push, two existing branches receive linear fast-forward updates. One branch receives a commit that introduces trailing whitespace and a second commit that removes it. All commits pushed to the other branch are clean. Which design meets both requirements? Choose ONE.

### Options

**A**

Run `git diff --cached --check` in `pre-commit` and check the net diff between each branch's old and proposed tips in `pre-receive`.

**B**

Run `git diff --check` in `pre-commit` and check the changes introduced by each incoming commit in `pre-receive`.

**C**

Run `git diff --cached --check` in `pre-commit` and check the changes introduced by each incoming commit in `pre-receive`.

**D**

Run `git diff --cached --check` in `pre-commit` and require CI to check the changes introduced by each pushed commit before merge.

Correct answer: C

### Explanation

The local check must use the index because it still holds the line with trailing whitespace. `git diff --cached --check` detects the staged error, and propagating its nonzero exit status from `pre-commit` stops the commit. Since developers can bypass that hook, the repository administrators need a receiving-side check. The `pre-receive` hook reads the old object ID, new object ID, and ref name for each proposed update. For these linear fast-forward updates, it checks the changes introduced by each commit in each old-to-new range. It detects the error in the first commit even though the second removes it. A nonzero `pre-receive` result rejects both ref updates in the push.

## Question 10

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a team is troubleshooting a required CI check for pull requests into `main` on GitHub.com. Contributors can push topic branches but cannot bypass the merge requirement. The team can edit the CI job. The developer and the Linux CI runner both use Git 2.48.1, with trailing spaces configured as whitespace errors.

A developer stages a one-line addition with trailing spaces. The local `pre-commit` hook runs `git diff --cached --check` and rejects the commit. Without changing the index, the developer runs `git commit --no-verify` and pushes the resulting commit. The required CI job checks out that exact commit with a clean working tree and index. Its sole parent is available. The job runs the same command as the hook and reports success. The job is configured to fail when its check exits nonzero.

Which change to the CI check catches the whitespace error while keeping the existing hook for local feedback? Choose ONE.

### Options

**A**

Check the patch from the commit's parent to the checked-out commit.  
  
`bash git diff --check HEAD^ HEAD `

**B**

Compare the working tree with the checked-out commit.  
  
`bash git diff --check HEAD `

**C**

Check the patch from the checked-out commit back to its parent.  
  
`bash git diff --check HEAD HEAD^ `

**D**

Invoke the existing `pre-commit` script directly from the CI checkout.

Correct answer: A

### Explanation

The local hook correctly rejected the staged addition. `git commit --no-verify` skipped the hook and committed the same staged content. In CI, `git diff --cached --check` compared the clean index with `HEAD`, so it found no changes to check. The forward diff from `HEAD^` to `HEAD` examines what the proposed commit introduced. The added line triggers a nonzero exit, which fails the required CI job and blocks the merge into `main`. The local hook still gives developers immediate feedback during ordinary commits.

## Question 11

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, you need to rehearse moving one repository to GitHub while preserving its commit history and existing pull request records. Either source repository is eligible for the pilot under your team's data-handling policy. Ledger is hosted at dev.azure.com in Azure DevOps Services. Dispatch is hosted on a self-managed Azure DevOps Server 2022 instance. Your Azure DevOps personal access token (PAT) for Ledger has the Work Items (Read), Code (Read), and Identity (Read) scopes. With your Dispatch PAT, you can read its code, work items, and identities. Cedar, Juniper, and Birch are GitHub Enterprise Cloud organizations on GitHub.com. You have the migrator role in all three. Cedar and Juniper allow classic PAT access, and you have a separate classic PAT with the repo, workflow, and read:org scopes for each. Birch blocks classic PAT access. A smoke test using a fine-grained PAT successfully read an existing Birch repository through the GitHub API. Quarry is a GitHub Enterprise Server lab that accepts locally issued classic PATs. The workstation has a supported GitHub CLI version and the ADO2GH extension. Given the hosts, credentials, and policies shown, which route can perform the required pilot migration? Choose ONE.

### Options

**A**

Use ADO2GH to migrate Ledger to Cedar with the Cedar classic PAT.

**B**

Use ADO2GH to migrate Dispatch to Juniper with the Juniper classic PAT.

**C**

Use ADO2GH to migrate Ledger to Birch with the Birch fine-grained PAT.

**D**

Use ADO2GH to migrate Ledger to Quarry with a Quarry classic PAT.

Correct answer: A

### Explanation

As of November 14, 2026, the documented ADO2GH route uses GitHub Enterprise Importer to transfer Git history and supported pull request records from Azure DevOps Cloud to GitHub Enterprise Cloud. Ledger and Cedar meet those host requirements. Ledger's PAT has the required Work Items (Read), Code (Read), and Identity (Read) scopes. Cedar permits classic PATs, and the engineer has the migrator role and a classic PAT with repo, workflow, and read:org scopes. Birch's successful fine-grained API read establishes repository read access only. Its classic PAT restriction blocks the import. Dispatch and Quarry fall outside the documented source and destination host requirements, respectively. After the Cedar trial completes, check the migration log and compare the imported commit history and representative pull requests with Ledger. [Supported hosts and migrated data](https://docs.github.com/en/migrations/ado/understand-migrations-from-azure-devops-to-github) · [Migration access requirements](https://docs.github.com/en/migrations/ado/manage-access) · [Trial migration procedure](https://docs.github.com/en/migrations/ado/migrate-your-repositories-from-azure-devops-to-github)

## Question 12

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, your team completes a trial migration from Azure DevOps Services to GitHub Enterprise Cloud using GitHub Enterprise Importer. The branch and tag refs match across both repositories. The accepted commit contains the same Git LFS pointer for models/baseline.bin in both repositories. Azure DevOps LFS returns a file whose SHA-256 and size match the pointer. In a fresh GitHub clone, another LFS file downloads successfully with the same credentials, but the GitHub LFS endpoint reports that the baseline object is missing. The migration workstation runs a Git LFS client version validated against both endpoints. Its credentials permit source LFS downloads and destination LFS uploads, and the object is within the destination's applicable LFS limits. Cutover requires a fresh clone to retrieve the baseline from GitHub LFS while preserving the accepted refs and commit IDs. Which action meets these requirements? Choose ONE.

### Options

**A**

Fetch the object into the migration clone, push the matching Git branch and tag refs again, and test a fresh GitHub clone.

**B**

Fetch the object from Azure DevOps LFS, upload it to GitHub LFS, and verify the file in a fresh GitHub clone.

**C**

Refresh the GitHub credentials, retry the LFS download from GitHub, and verify the file against the pointer.

**D**

Point the fresh GitHub clone at Azure DevOps LFS, download the object there, and verify the file against the pointer.

Correct answer: B

### Explanation

The identical pointers establish that the Git history references the correct object on both hosts. The verified source download and the missing-object response from GitHub locate the failure in the destination LFS store. Transfer the object bytes to GitHub LFS and verify that a fresh clone retrieves them directly from GitHub. Pushing refs that already match leaves the missing object unresolved, and using the source endpoint leaves checkout dependent on Azure DevOps.

## Question 13

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, a team uses GitHub Enterprise Importer to migrate an Azure Repos repository from Azure DevOps Services to a private repository in a GitHub Enterprise Cloud organization on GitHub.com. The migration succeeds. The cutover engineer has the migrator role, and a destination organization owner is available to complete follow-up work in the browser. Lee and Morgan are already members of the destination organization. Lee’s migrated pull request comments still show a mannequin, and Lee has received no attribution invitation. Morgan’s attribution invitation shows Completed, and her migrated comments display her GitHub account. Morgan still cannot open the private repository. The owner verifies that neither user has a direct or inherited repository grant. Both contributors must receive credit for their migrated comments. Only Morgan is approved for repository Read access. The destination already has a readers team with Read access to this repository. Which plan meets both requirements? Choose ONE.

### Options

**A**

Have the organization owner invite Lee to reclaim the mannequin and confirm that Lee accepts. Have Morgan sign in again to pick up Read access from her completed reclaim.

**B**

Add Morgan to the readers team. Have the cutover engineer use the migrator role to invite Lee to reclaim the mannequin and confirm that Lee accepts.

**C**

Add Lee and Morgan to the readers team. Have the organization owner invite Lee to reclaim the mannequin and confirm that Lee accepts.

**D**

Add Morgan to the readers team. Have the organization owner invite Lee to reclaim the mannequin and confirm that Lee accepts.

Correct answer: D

### Explanation

Treat attribution and repository access as two separate cutover checks. Lee’s mannequin shows that attribution still needs to be resolved. The destination organization owner sends the attribution invitation, and Lee’s acceptance credits the imported comments. Morgan’s comments already display her account, so her remaining issue is repository authorization. Adding Morgan alone to the readers team supplies the approved Read access. [GitHub’s post-migration guidance](https://docs.github.com/en/enterprise-cloud@latest/migrations/ado/follow-up-tasks#reclaiming-mannequins) and [mannequin reclaim documentation](https://docs.github.com/en/enterprise-cloud@latest/migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer).

## Question 14

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

You are moving an Azure DevOps Cloud repository to GitHub Enterprise Cloud with GitHub Enterprise Importer and the ADO2GH CLI. The team must preserve Git history, selected pull request records, and Git LFS content. Under the ADO2GH behavior documented as of November 14, 2026, the 38 GiB repository qualifies for the 40 GiB preview allowance in both the trial and production destinations. The migration operator has the granted migrator role and an approved classic GitHub PAT with repo, workflow, and read:org scopes. The Azure DevOps PAT has Work Items (Read), Code (Read), and Identity (Read) scopes. The queue-only trial in a separate GitHub organization returned successfully. It is still queued. The trial and production acceptance checks cover expected refs, representative pull request records, an LFS checkout, and Azure Pipelines and Azure Boards connectivity. The team can freeze ordinary Azure Repos writes for the final transfer, but an emergency release may still require a source hotfix and a release tag during the import or during final validation. The release lead can close that exception path for the handover. Which plan should the team use? Choose ONE.

### Options

**A**

Accept the trial after it completes and passes validation. Start the ordinary-write freeze when the final import completes. Have the release lead track and reconcile source changes from that point through the handover, then validate the production destination.

**B**

Accept the trial after it completes and passes validation. Freeze ordinary writes before the final transfer. Have the release lead reconcile source exceptions through import completion, then use the imported state as the baseline for final acceptance.

**C**

Use the successful queue response as the trial gate and start the final transfer under an ordinary-write freeze. Have the release lead reconcile source exceptions through the handover, then run the acceptance checks on the production destination.

**D**

Accept the trial after it completes and passes validation. Freeze ordinary writes before the final transfer. Have the release lead track source exceptions through closure and reconcile them, then validate the production destination before enabling GitHub writes.

Correct answer: D

### Explanation

First wait for the trial to finish, inspect its migration logs, and run the trial acceptance checks. For production, freeze ordinary source writes before starting the final transfer and give the release lead responsibility for every approved exception until the source exception path closes. After closure, manually transfer any missing hotfix commits and release tags, then verify branch heads, tag targets, representative pull request records, LFS object checkout, and integration connectivity before enabling GitHub writes. Import completion can precede a valid source hotfix, so the reconciliation window must extend through the handover.

## Question 15

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

You are preparing to rebuild the latest commit on a private release branch. Its tip has never been pushed or shared. You are working from the repository root in PowerShell on Windows and have write access to the repository. The following terminal output shows all local changes at the start of the exercise.

```powershell
PS> git --version
git version 2.47.1.windows.1
PS> git log --first-parent -2 --oneline
7bd31c4 Adjust timeout for release testing
2ac8fe1 Record the release baseline
PS> git status --short
M  release.txt
MM settings.env
PS> git show HEAD~1:settings.env
TIMEOUT_SECONDS=20
PS> git show HEAD:settings.env
TIMEOUT_SECONDS=30
PS> git show :settings.env
TIMEOUT_SECONDS=45
PS> Get-Content settings.env
TIMEOUT_SECONDS=60
PS> git show HEAD~1:release.txt
Status: draft
PS> Get-Content release.txt
Status: ready for testing
```

Move the branch tip back to `2ac8fe1`. Keep `TIMEOUT_SECONDS=45` staged in `settings.env` and keep `TIMEOUT_SECONDS=60` in its working copy. Unstage `release.txt` while preserving `Status: ready for testing` in its working copy. Evaluate each sequence from the same starting state without running it.

Which command sequence produces the required state? Choose ONE.

### Options

**A**

`powershell git reset --soft HEAD~1 git restore --staged --worktree -- release.txt `

**B**

`powershell git reset --soft HEAD~1 git restore --staged -- release.txt `

**C**

`powershell git reset --mixed HEAD~1 git add -- settings.env `

**D**

`powershell git reset --hard HEAD~1 git restore --source=7bd31c4 --staged -- settings.env `

Correct answer: B

### Explanation

The first-parent log shows that `HEAD~1` resolves to `2ac8fe1`. The short status code `MM` shows that `settings.env` has both a staged change and a further working-tree change. A soft reset moves the private branch to `2ac8fe1` while retaining both versions, so the index still holds `TIMEOUT_SECONDS=45` and the working tree still holds `TIMEOUT_SECONDS=60`. After the reset, `git restore --staged -- release.txt` restores just that index entry from the new HEAD. The index therefore holds `Status: draft`, and the working copy still holds `Status: ready for testing` as an unstaged change.

## Question 16

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

A release engineer uses Git 2.43 with an Azure Repos Git repository in Azure DevOps Services. A production run attempted six deployments in parallel, and the targets require one deployment at a time. The engineer checks the two latest commits on `main` and confirms that both are single-parent commits.

* `7e3bc92` raised the parallel deployment limit from one to six in `deploy/rollout.yml`.
* `18cad41`, the current tip of `main`, enabled deployment audit logging elsewhere in the same file. It left the parallel deployment limit at six.

The inspected diffs show the edits in separate hunks, with unchanged lines between them. The audit logging edit is outside the changed lines and surrounding context of the parallel-limit hunk.

The fix must restore the limit to one, keep audit logging enabled, and retain both original commits in the ancestry of `main`. The engineer has a clean repair branch at `18cad41` and permission to push that branch and open a pull request. Updates to `main` require a pull request that a maintainer can merge after validation. Force pushes to `main` are blocked.

Which plan meets these requirements? Choose ONE.

### Options

**A**

Run `git revert 7e3bc92` on the repair branch and open a pull request to `main` with the resulting commit.

**B**

Hard-reset the repair branch to `7e3bc92^`, cherry-pick `18cad41`, and force-push the resulting tip to `main`.

**C**

Run `git revert 7e3bc92^..18cad41` on the repair branch and open a pull request to `main` with the resulting commits.

**D**

Restore `deploy/rollout.yml` from `7e3bc92^` with `git restore --source=7e3bc92^ -- deploy/rollout.yml`, commit the restored file, and open a pull request to `main`.

Correct answer: A

### Explanation

Use `git revert 7e3bc92` to create an inverse commit on top of `18cad41`. The inspected diffs show that the audit logging edit is outside the parallel-limit hunk and its unchanged context, so the inverse applies cleanly and restores the limit to one while leaving audit logging enabled. The engineer can push the repair branch and open a pull request. After validation, the maintainer can merge the fix, preserving both original commits in the ancestry of `main`. Restoring the entire earlier file or reverting both commits would undo audit logging. Resetting and replaying the later change would replace published history and require a blocked force push.

## Question 17

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

On November 14, 2026, you are working on a Linux workstation running Git 2.43.0 in a local clone of an Azure Repos repository. You have write access to the clone, and the branch name `recover-predeploy` is available.

A local reset discarded a commit that added a predeployment check. You then made a new commit on `feature/pipeline`. You need a recovery branch that points to the discarded commit while keeping `feature/pipeline` checked out at its current tip and preserving the index and working tree.

```text
$ git reflog -4 --oneline --no-decorate
c73e2ab HEAD@{0}: commit: Adjust pipeline timeout
aa612d0 HEAD@{1}: reset: moving to HEAD~1
d9f2e61 HEAD@{2}: commit: Add predeployment check
aa612d0 HEAD@{3}: commit: Set pipeline variables
```

Both `aa612d0` and `d9f2e61` still resolve to local commit objects. You also deleted an untracked `runner-notes.txt` whose contents were never staged, committed, stashed, or otherwise stored in Git.

Which recovery plan correctly handles both the commit and the deleted file? Choose ONE.

### Options

**A**

Run `git branch recover-predeploy d9f2e61`. Use the reflog to recover the deleted note.

**B**

Run `git branch recover-predeploy aa612d0`. Recovering the deleted note requires a copy from outside Git.

**C**

Run `git branch recover-predeploy d9f2e61`. Recovering the deleted note requires a copy from outside Git.

**D**

Run `git branch recover-predeploy aa612d0`. Use the reflog to recover the deleted note.

Correct answer: C

### Explanation

The reflog identifies `d9f2e61` as the commit that added the predeployment check and `aa612d0` as the destination of the reset. Because `d9f2e61` still exists in the local object database, `git branch recover-predeploy d9f2e61` gives it a named reference while preserving the current checkout, branch tip, index, and working tree. The reflog records local reference movements. The deleted note existed only in the working tree, so recovering its bytes requires a source outside Git.

## Question 18

Type: single\_choice
Knowledge point: Configure and manage repositories for Azure DevOps and GitHub

A deployment token was committed to a GitHub Enterprise Cloud repository. A later commit removed the token from the current main tree, but the commit that introduced it is still an ancestor of main and is the target of the v4.2.0 release tag. Deployments now succeed with a replacement token, and the issuer still lists the exposed token as active. You can revoke the exposed token at its issuer. A repository administrator must approve a temporary exception to rewrite main and replace the protected release tag. Incident policy requires immediate containment, followed by removal of the token from the history reachable from both refs. The release tag must still identify the v4.2.0 release contents with the token removed. Which sequence meets these requirements? Choose ONE.

### Options

**A**

Revoke the token at its issuer, then use the approved exception to rewrite main and move the release tag to the cleaned release commit.

**B**

Revoke the token at its issuer, rewrite main during the approved exception, and retain the original release tag.

**C**

During the approved exception, rewrite main and move the release tag to the cleaned release commit. Then revoke the token at its issuer.

**D**

Revoke the token at its issuer, then use the approved exception to move the release tag to the current main tip and keep the existing branch history.

Correct answer: A

### Explanation

Revoke the exposed token first. Deployments already use a working replacement, and revocation at the issuer invalidates the exposed token even if someone copied it. The clean main tree still has the secret-bearing commit in its ancestry, and v4.2.0 points directly to that commit. Use the administrator-approved exception to publish a scoped rewrite of main and repoint v4.2.0 to the corresponding cleaned release commit. Verify that neither ref reaches history containing the token, restore the protections, and coordinate with collaborators so existing clones do not reintroduce the old history.

