revert a file to a specific commit using git Assuming your commit id is 8a02c028 git checkout 8a02c028 -- file1/to/restore…