git reset filename code example
Example 1: git undo all changes
git reset --hard
Example 2: git reset one file
git checkout HEAD -- my-file.txt
Example 3: git delete changes
git clean -df
git checkout -- .
Example 4: git file reset to head
git checkout HEAD -- my-file.txt