Free AZ-400 Exam Braindumps
Designing and Implementing Microsoft DevOps Solutions Questions 7–11 (page: 29)

Updated On: 16-Nov-2026

You have a GitHub repository.
A file that contains secrets is committed and pushed to the repository accidentally.
You need to perform the following actions:
-Remove the file from the repository.
-Remove all commits that include the file from the repository.
The solution must minimize administrative effort.
What should you use?

  1. GitHub Actions
  2. a branch protection rule
  3. the git filter-repo command
  4. the git rm command

Answer(s): C

Explanation:

To remove a sensitive file and its entire history from a GitHub repository, the most effective and recommended tool is git-filter-repo.
The Fastest Solution: git-filter-repo
This tool effectively "rewrites" your project's history as if the file never existed.
1. Install the toolpip install git-filter-repo
2. Make a fresh clone
Work on a fresh copy to avoid messing up your local work:git clone --mirror https://github.com
3. Run the removal commandgit filter-repo --path path/to/secret_file --invert-paths
4. Force push to GitHub
Update the remote server with the "cleaned" history:git push origin --force --all


Reference:

https://dev.to/chriswinnen/youve-leaked-a-secret-in-your-git-repository-now-what-2od6



You are using GitHub as a source code repository.
You create a client-side Git hook on the commit-msg event. The hook requires that each commit message contain a custom work item tag.
You need to make a commit that does not have a work item tag.
Which git commit parameter should you use.

  1. --message ''
  2. --no-verify
  3. --squash
  4. --no-post-rewrite

Answer(s): B

Explanation:

The commit-msg hook is invoked by git-commit and git-merge, and can be bypassed with the --no-verify option.


Reference:

https://git-scm.com/docs/githooks



DRAG DROP (Drag and Drop is not supported)
You have a GitHub repository named repo1.
You migrate repo1 to an Azure Repos repository named repo2.
After the migration, changes are made to repo1.
You need to sync the changes to repo2.
How should you complete the script? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Note: Each correct selection is worth one point.
Select and Place:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




First, clone the Azure Repos repository (repo2). Then, configure the original GitHub repository (repo1) as the upstream remote. Finally, fetch the latest changes and tags from GitHub and push all local branches to Azure Repos.


Reference:

https://learn.microsoft.com/en-us/azure/devops/repos/git/import-git-repository?tabs=visual-studio&view=azure-devops



HOTSPOT (Drag and Drop is not supported)
You have a .NET app named App1.
You need to upload App1 to GitHub Packages.
How should you complete the command? To answer, select the appropriate options in the answer area.
Note: Each correct selection is worth one point.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:




The dotnet nuget push command pushes a package to the server and publishes it. The push command uses server and credential details found in the system's NuGet config file or chain of config files.
Box 1: dotnet
We publish the package to GitHub packages. Using “dotnet nuget push“, with the NuGet package location, defaulting the api-key to GITHUB_TOKEN again, and specifying the source “github” (that we just setup in step 3).
- name: Publish to GitHub packages run: dotnet nuget push DemoLibrary/DemoLibrary/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
Box 2: nuget push


Reference:

https://samlearnsazure.blog/2021/07/27/publishing-a-nuget-package-to-github-packages/
https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push



HOTSPOT (Drag and Drop is not supported)
Your company uses GitHub for source control. GitHub repositories store source code and store process documentation. The process documentation is saved as Microsoft Word documents that contain simple flow charts stored as .bmp files.
You need to optimize the integration and versioning of the process documentation and the flow charts. The solution must meet the following requirements:
-Store documents as plain text.
-Minimize the number of files that must be maintained.
-Simplify the modification, merging, and reuse of flow charts.
-Simplify the modification, merging, and reuse of documents.
Hot Area:

  1. See Explanation section for answer.

Answer(s): A

Explanation:



Box 1: Markdown (.md)
Github understands several text formats, including .txt and .md. .md stands for a file written in Markdown.
Box 2: Mermaid diagrams
Mermaid lets you create diagrams and visualizations using text and code.
It is a Javascript based diagramming and charting tool that renders Markdown-inspired text definitions to create and modify diagrams dynamically.


Reference:

https://ourcodingclub.github.io/tutorials/git/
https://mermaid-js.github.io/mermaid/#/



Viewing page 29 of 81
Viewing questions 141 - 145 out of 398 questions


Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!