how to revert a single file to previous commit in git code example
Example 1: how to commit file to previous commit in git
$ git add new-file
$ git commit --amend
Example 2: git revert commit for single file
git checkout <commit_hash> path/to/file