You have an Azure subscription that contains an Azure container registry. The container registry contains an ACR Tasks task named Task1. Task1 is configured to run once every five days.You need to trigger Task1 to run immediately.Which command should you run?
Answer(s): A
ACR Tasks supports multi-step, multi-container-based workflows that can automatically trigger when you commit source code to a Git repository.Test the multi-step workflowTo test the multi-step task, trigger it manually by executing the az acr task run command:az acr task run --registry $ACR_NAME --name example1
https://learn.microsoft.com/en-us/azure/container-registry/container-registry-tutorial-multistep-task
DRAG DROP (Drag and Drop is not supported)You have a Git repository that uses project source control.A file is committed to the repository. No further changes were made since the file was committed.You need to remove the file from the branch history.Which three Git 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:
Box 1: git logIdentifies the commit containing the file.Box 2: git rebaseRewrites the branch history to remove the file's commit.Box 3: git pushUpdates the remote repository with the rewritten history.Note: In practice, use interactive rebase (git rebase -i) and, if the history was already pushed, git push --force-with-lease.
https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History https://learn.microsoft.com/en-us/azure/devops/repos/git/remove-binaries?view=azure-devops
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.gitIncorrect: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 designing a version control solution for large binary files stored in an Azure Repos repository.You need to recommend a solution to minimize the impact of the files on the performance of the repository. The solution must ensure that you can track the version information of the files.What should you include in the recommendation?
Answer(s): B
To minimize performance impact while tracking version information for large binary files in Azure Repos, you should use Git Large File Storage (LFS).Replaces Files with Pointers: Git LFS replaces large files (like audio, video, datasets, and graphics) with tiny text pointer files inside the main Git repository.Reduces Clone Times: The actual heavy binary files are stored on a separate Azure DevOps audio/visual stream, preventing your local repository size from exploding and keeping git clone and git fetch operations incredibly fast.Maintains Version History: Even though the binaries live outside the main Git tree, Git LFS still tracks their version history seamlessly. You can still checkout, branch, and merge as normal.
https://fiveable.me/writing-for-communication/unit-10/version-control-file-management/study-guide/NXdkwBH3 DEmU4j8e
HOTSPOT (Drag and Drop is not supported)You have a GitHub repository that contains a workflow named WF1. WF1 is used to build code for an app named App1.You need to add a build status badge to the README.md file in the repository for App1.How should you complete the URL for the badge? To answer, select the appropriate options in the answer area.Note: Each correct selection is worth one point.Hot Area:
Box 1: Repository ownerBox 2: Repository nameAdding a workflow status badgeYou can display a status badge in your repository to indicate the status of your workflows.Using the workflow file nameYou can build the URL for a workflow status badge using the name of the workflow file:https://github.com/OWNER/REPOSITORY/actions/workflows/WORKFLOW-FILE/badge.svgTo display the workflow status badge in your README.md file, use the Markdown markup for embedding images.Note: A status badge shows whether a workflow is currently failing or passing. A common place to add a status badge is in the README.md file of your repository, but you can add it to any web page you'd like. By default, badges display the status of your default branch. You can also display the status of a workflow run for a specific branch or event using the branch and event query parameters in the URL.
https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge
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.