Microsoft DevOps Engineer Expert AZ-400 Practice Question

Your team accidentally committed an Azure service principal JSON file that contains client secrets to an Azure Repos Git repository. The secret appears in multiple branches and tags. You must permanently remove every instance of the secret from the repository history and ensure that new clones cannot retrieve it. The solution should complete quickly on a repository that is several gigabytes in size and preserve all other history. What should you do?

  • Add the JSON file to the repository's .gitignore, commit the change, and push it to all branches.

  • Run BFG Repo-Cleaner with a text-replacement or file-deletion rule against the bare repository mirror, then force-push the rewritten history to origin.

  • Delete the branch that first introduced the secret and push the deletion to origin.

  • Revert the commit that added the JSON file on every branch and push the new commits to origin.

Microsoft DevOps Engineer Expert AZ-400
Design and implement a source control strategy
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot