nerdexam
CompTIA

XK0-006 · Question #47

A DevOps engineer made some changes to files on a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following…

The correct answer is B. git reset. The git reset command reverts changes in the local repository to a previous commit, effectively discarding the problematic modifications and restoring the application to a working state.

Automation, Orchestration, and Scripting

Question

A DevOps engineer made some changes to files on a local repository. The engineer realizes that the changes broke the application and the changes need to be reverted back. Which of the following commands is the best way to accomplish this task?

Options

  • Agit pull
  • Bgit reset
  • Cgit rebase
  • Dgit stash

How the community answered

(23 responses)
  • A
    4% (1)
  • B
    91% (21)
  • D
    4% (1)

Explanation

The git reset command reverts changes in the local repository to a previous commit, effectively discarding the problematic modifications and restoring the application to a working state.

Topics

#git reset#version control#git#code revert

Community Discussion

No community discussion yet for this question.

Full XK0-006 Practice