how to revert changes of a file in git code example
Example 1: undo unstaged changes git
git checkout -- .
Example 2: reset certain file git
git checkout c5f567 -- file1/to/restore file2/to/restore
git checkout -- .
git checkout c5f567 -- file1/to/restore file2/to/restore