Developing Applications Using Cisco Core Platforms and APIs (DEVCOR) — Question 90
Which Git command enables the developer to revert back to f414f31 commit to discard changes in the current working tree?
Answer options
- A. git reset --hard f414f31
- B. git reset checkout --hard f414f31
- C. git reset --soft f414f31
- D. git checkout f414f31
Correct answer: A
Explanation
The command 'git reset --hard f414f31' is the correct choice because it resets the current branch to the specified commit and discards all changes in the working directory. The other options either contain incorrect syntax or do not remove changes in the working tree as required.