You manage source control by using GitHub.You have a file named Data.txt that contains sensitive data. A user pushes Data.txt to a repository.You need to purge the file from the repository.Which two commands can you use? Each correct answer presents a complete solution.Note: Each correct solution is worth one point.
Answer(s): D,E
E:The ProblemHow do I delete a file from a Git repository?The SolutionWe can do this using git rm:git rm unwanted-file.txtThis command will delete the file and stage its deletion to be included in the next commit. If we want to remove a directory, we must include the -r (recursive) flag, as with the standard rm command.D:If the file we want to remove contains sensitive content, we will need either to create a new Git repository with a fresh history or to rewrite the history of our current repository using git filter-branch:git filter-repo -f --index-filter 'git rm --cached --ignore-unmatch unwanted-file.txNote that rewriting the commit history in this way is dangerous and will permanently alter your repository. Additionally, git filter-branch is a slow operation, especially for large repositories with many commits. Double-check that the name of the file to be removed is correct before running this command.After our commit history has been rewritten, we will need to force push the changes to remote repositories using a command such as the following:git push --force -u origin main
https://sentry.io/answers/delete-a-file-from-a-git-repository/
SIMULATIONFor Project-12345678, you need to create a service connection that can be used to deploy resources to the RG1 resource group.The service connection must use the Managed_id1 identity and workload identity federation.Note: For the Identity type, you need to use the App registration or managed identity (manual) option.
Answer(s): A
See explanation below.To create a scoped Azure DevOps service connection using an existing Managed Identity and Workload Identity Federation, follow these steps:Action 1: Configure the Service Connection in Azure DevOpsStep 1: Navigate to your Project Settings in Azure DevOps. [Select Project-12345678]Step 2: Select Service connections under the Pipelines section.Step 3: Click New service connection and select Azure Resource Manager.Step 4: Choose Workload Identity federation (manual) as the authentication method.Step 5: Enter the following details:Connection name: A unique name for your pipeline to reference.Scope level: Select Subscription.Subscription ID/Name: Enter your specific subscription details.Resource Group: Enter the name of your specific resource group here to restrict the connection's visibility. [Enter RG1]Issuer and Subject identifier: Azure DevOps will generate these values after you save or during the setup. Copy these values; you will need them for the next step.Action 2: Establish the Federated Trust in AzureStep 6: Go to the Managed Identity resource in the Azure Portal.'Step 7: Select Federated credentials under the Settings menu.Step 8: Click Add credential.Step 9: Select Other scenario for the federation type.Step 10: Paste the Issuer and Subject identifier provided by Azure DevOps.Step 11: Give the credential a name and click Add.
https://microsoftlearning.github.io/implement-security-through-pipeline-using-devops/Instructions/Labs/APL200 1_M00_Validate_Lab_Environment.html
SIMULATIONYou need to create a new team dashboard named Dashboard1 for the default project team of Project1.The dashboard must display the members of the team.
See explanation below.Add dashboards in Azure DevOpsAdd a dashboardAdd a new dashboard as needed to support your team's needs. You can also edit and rename any existing dashboards associated with your team.Step 1: From the Dashboards directory, select New Dashboard. Or, when viewing a dashboard, open the selector and select the New Dashboard option.Step 2: Enter the name of the dashboard and other information you want to capture. [Enter Dashboard1]Step 2a: Select Team dashboard.Step 2b: Select: Automatically refresh the dashboard every 5 minutes.Step 3: Select Create.
https://learn.microsoft.com/en-us/azure/devops/report/dashboards/dashboards
Your company implements an Agile development methodology.You plan to implement retrospectives at the end of each sprint.Which three questions should you include? Each correct answer presents part of the solution.Note: Each correct selection is worth one point.
Answer(s): C,D,E
You manage a project by using Azure Boards, and you manage the project code by using Azure Repos.You have a bug work item that has an ID of 123.You need to set the work item state to Resolved.What should you add to the commit message?
Correct:* #123 fixed* Fixes #123Incorrect:* #123 completes* #123 Resolved* Completed #123* Resolves #AB-123* Verifies #123Note: Resolve work items on commitClose work items by mentioning keywords in commit messages. When you mention a work item in a commit that makes it to the default branch via one of the supported workflows, we will attempt to resolve that work item.KeywordsThe three supported keywords to trigger a resolution mention are fix, fixes, and fixed (case insensitive). Optionally, a colon can follow the keyword. Most forms of punctuation can precede or proceed the resolution mention, excluding another pound sign (#).ExamplesFixes #123This fixed #123!Change behavior to fix: #123Fixes #123 and fixes #124
https://learn.microsoft.com/en-us/azure/devops/repos/git/resolution-mentions
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.