how to throw all the changes in a file using git code example
Example 1: git reset one file
git checkout HEAD -- my-file.txt
Example 2: revert unstaged changes git
git checkout -- path/to/file/to/revert
Example 3: revert unstaged changes git
git checkout -- .