Deployment, Provisioning, and Automation

A faulty infrastructure configuration commit has been merged into a shared Git branch. The team must undo that commit's changes while preserving published history; what should the operator do?

Show the answer

Correct answerD. Revert the faulty commit.

AWhy not this: Rebase rewrites commit history instead of recording a new reversal commit.

BWhy not this: Cherry-pick reapplies a commit's changes rather than reversing them.

CWhy not this: Reset moves the branch reference backward rather than preserving its published history.

DWhy this is right: Revert records an inverse change as a new commit without removing published commits.

Git revert creates a new commit that reverses the selected commit's changes while preserving history. Resetting the shared branch to an earlier commit moves its reference backward and would require rewriting published history.