how to revert back a particular file to previous commit in git code example Example: reset certain file git git checkout c5f567 -- file1/to/restore file2/to/restore