701-100 practice question 9 of 15

The file index.php, which is being maintained in a git repository, was changed locally and contains an error. If the error has not been committed to the repository yet, which of the following git commands reverts the local copy of index.php to the latest committed version in the current branch?

Full set: 60 questions
Answer options
A: git lastver – index.php
B: git revert – index.php
C: git checkout – index.php
D: git clean – index.php
E: git repair – index.php
Correct Answer:
B Reference https://git-scm.com/docs/git-revert
Scroll to Top