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?

Posted by: Pdfprep Category: 701-100 Tags: , ,

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?
A . git lastver C index.php
B . git revert C index.php
C . git checkout C index.php
D . git clean C index.php
E . git repair C index.php

Answer: B

Explanation: https://git-scm.com/docs/git-revert

Leave a Reply

Your email address will not be published.