Microsoft DevOps Engineer Expert AZ-400 Practice Question

Your team's Azure Repos Git repository has a shared branch named feature-alpha. A teammate accidentally executed git reset --hard HEAD~3 followed by git push --force, removing the last three commits from the remote branch. You have an existing local clone of the repository and just ran git fetch. You must now restore feature-alpha on the server. Which Git command should you run first in your local repository to locate the lost commit IDs?

  • git fetch --force origin feature-alpha

  • git revert HEAD~3..HEAD

  • git cherry-pick origin/feature-alpha@{1}

  • git reflog origin/feature-alpha

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