AZ400-Q: undo a merged bad change
A merged commit caused a defect and shared history must remain intact. What is usually the safest Git response?
- A) Force-push a rewritten main branch.
- B) Create a revert commit, validate it, and link it to the incident. ✓
- C) Delete the entire repository.
- D) Change only the deployed artifact without source changes. Answer: B. A revert is an auditable new change that avoids rewriting shared history. Why not the others: History rewrites and artifact-only changes reduce traceability.