Your company uses a Git repository in Azure Repos to manage the source code of a web application. The default branch is protected from direct updates. Developers work on new features in the topic branches.Because of the high volume of requested features, it is difficult to follow the history of the changes to the default branch.You need to enforce a pull request merge strategy. The strategy must meet the following requirements:-Consolidate commit histories.-Merge the changes into a single commit.Which merge strategy should you use in the branch policy?
Answer(s): D
To consolidate commit histories and merge changes into a single commit in Azure Repos, you should use the Squash merge strategy.Why Squash Merge is the Best StrategyConsolidation: It takes all commits from the topic (source) branch and combines them into a single new commit on the target branch.Clean History: It removes "noise" from the default branch by discarding individual intermediate commits (e.g., "fixed typo," "trying again") that occurred during development.Linearity: The resulting history on the default branch remains linear and easy to follow, as each feature appears as exactly one commit.
https://learn.microsoft.com/en-us/azure/devops/repos/git/merging-with-squash?view=azure-devops
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
You manage code by using GitHub.You need to ensure that repository owners are notified if a new vulnerable dependency or malware is found in their repository.What should you do?
Answer(s): B
Identifying vulnerabilities in your project's dependencies with Dependabot alertsDependabot generates Dependabot alerts when known vulnerabilites are detected in dependencies that your project uses.GitHub sends Dependabot alerts when we detect that your repository uses a vulnerable dependency or malware.
https://docs.github.com/en/code-security/dependabot/dependabot-alerts/about-dependabot-alerts
DRAG DROP (Drag and Drop is not supported)You have an Azure Repos repository named repo1.You delete a branch named features/feature11.You need to recover the deleted branch.Which three commands should you run in sequence? To answer, move the appropriate commands from the list of commands to the answer area and arrange them in the correct order.Select and Place:
Step 1: git logIdentifies the SHA-1 hash of the commit that the deleted branch previously pointed to.Step 2: git checkout <SHA>Checks out the identified commit.Step 3: git branch features/feature11Recreates the deleted branch at that commit.Note: If the deleted branch's commits are not visible in git log, use git reflog to locate the original commit.
You use Git for source control.You need to commit a 3-GB ZIP file that contains virtual machines used for testing. The solution must meet the following requirements:-The file must be versioned.-The file must be associated with the corresponding code commits.Which two actions should you include in the solution? Each correct answer presents part of the solution.Note: Each correct selection is worth one point.
Answer(s): C,D
C: Configuring Git Large File StorageOnce Git LFS is installed, you need to associate it with a large file in your repository.D: Enable and manage blob versioningYou can enable Blob storage versioning to automatically maintain previous versions of a blob when it is modified or deleted. When blob versioning is enabled, then you can restore an earlier version of a blob to recover your data if it is erroneously modified or deleted.
https://docs.github.com/en/repositories/working-with-files/managing-large-files/configuring-git-large-file-storage https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/storage/blobs/versioning-enable.md
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.