You have an Azure subscription that uses Azure Boards and Azure Repos.You have GitHub repositories.You need to ensure that all activity in the repositories is traced by using Azure Boards. The solution must minimize development effort.What should you use?
Answer(s): A
Azure Boards, Link work items to objectsWork item links are associations between two work items or a work item and another object. Links describe the relationship between objects. You can use work item links to track dependencies and related work for traceability, share information, manage complex projects that involve multiple teams or products, track code changes, tests, and more.Types of linksThe following types of links help you manage the various relationships between work items and other objects.* GitHubConnects a work item to a GitHub repository branch, commit, issue, or pull request.* Etc.
https://learn.microsoft.com/en-us/azure/devops/boards/backlogs/add-link
HOTSPOT (Drag and Drop is not supported)You use Git for source control.You need to optimize the performance of a repository. The solution must meet the following requirements:Permanently remove all items referenced only in the reflog.Remove history that is NOT in any current branch.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:
Box 1: reflogPermanently remove all items referenced only in the reflog.You need, specifically, the --expire-unreachable option:git reflog expire --expire=90.days.ago --expire-unreachable=now --allBox 2: gcRemove history that is NOT in any current branch.In most cases, users will not need to call git prune directly, but should instead call git gc, which handles pruning along with many other housekeeping tasks.git-gc - Cleanup unnecessary files and optimize the local repositorySYNOPSISgit gc [--aggressive] [--auto] [--quiet] [--prune=<date> | --no-prune] [--force] [--keep-largest-pack]Options include:--prune=<date>Prune loose objects older than date (default is 2 weeks ago, overridable by the config variable gc.pruneExpire). --prune=now prunes loose objects regardless of their age and increases the risk of corruption if another process is writing to the repository concurrently; see "NOTES" below. --prune is on by default.Box 3: now
https://stackoverflow.com/questions/49067898/git-remove-old-reflog-entries https://git-scm.com/docs/git-prune https://git-scm.com/docs/git-gc
You have a 1-TB Azure Repos repository named repo1.You need to clone repo1. The solution must meet the following requirements:You must be able to search the commit history of the /src directory.The amount of time it takes to clone the repository must be minimized.Which command should you run?
Partial cloneAs Git repositories grow in size, they can become cumbersome to work with because of:The large amount of history that must be downloaded.The large amount of disk space they require.Partial clone is a performance optimization that "allows Git to function without having a complete copy of the repository. The goal of this work is to allow Git better handle extremely large repositories." Git 2.22.0 or later is requiredFilter by object typeIntroduced in GitLab 12.10.For repositories with millions of files and a long history, you can exclude all files and use git sparse-checkout to reduce the size of your working copy.# Clone the repo excluding all files$ git clone --filter=blob:none --sparse git@gitlab.com:gitlab-com/www-gitlab-com.git Incorrect:Not B:git clone -depth-1git@ssh.dev.azure.com:v3/org/Project1/repo1"Clone depth" is a feature of git to reduce server load: Instead of cloning the complete repository (as usually done with git), using clone depth just clones the last clone-depth-number revisions of your repository.In literature this is also called "shallow clone"Git shallow clone lets you pull down just the latest commits, not the entire repo history. So if your project has years of history, or history from thousands of commits, you can select a particular depth to pull.
https://docs.gitlab.com/ee/topics/git/partial_clone.html https://www.perforce.com/blog/vcs/git-beyond-basics-using-shallow-clones
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.
Answer(s): B
The commit-msg hook is invoked by git-commit and git-merge, and can be bypassed with the --no-verify option.
https://git-scm.com/docs/githooks
You manage code by using GitHub.You plan to ensure that all GitHub Actions are validated by a security team.You create a branch protection rule requiring that code changes be reviewed by code owners.You need to create the CODEOWNERS file.Where should you create the file?
In the situation you want consume the results directly from a file you can read ./codeowner-information.json from the root of the repository.Incorrect:Not A: Custom pathIf your CODEOWNERS file isn't in the root of your repository, but for instead in the .github directory, you can change the path by using the path parameter:- id: codeowner uses: SvanBoxel/codeowners-action@v1with:path: './.github/CODEOWNERS'
https://github.com/marketplace/actions/codeowners-action
Post your Comments and Discuss Microsoft AZ-400 exam prep with other Community members:
Our website is free, but we have to fight against AI bots and content theft. We're sorry for the inconvenience caused by these security measures. You can access the rest of the AZ-400 content, but please register or login to continue.