git reset file from head code example
Example 1: git file reset to head
git checkout HEAD -- my-file.txt
Example 2: git reset file
git checkout HEAD -- my-file.txt
git checkout HEAD -- my-file.txt
git checkout HEAD -- my-file.txt