S

Satya • 3.38K Points
Extraordinary

Q. How can you revert a file to its last committed state?

  • (A) git pull file
  • (B) git reset file
  • (C) git restore file
  • (D) git revert file
  • Correct Answer - Option(C)
  • Views: 48
  • Filed under category GitHub
  • Hashtags:

Explanation by: Satya

'git restore <file>' reverts changes in the working directory to the last commit.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.