How can I reset or revert a file to a specific revision?
Asked 07 September, 2021
Viewed 1.6K times
  • 55
Votes

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.

I have done a git log along with a git diff to find the revision I need, but just have no idea how to get the file back to its former state in the past.

30 Answer