git reset branch files code example
Example 1: git reset head of master
git fetch origin
git reset --hard origin/master
Example 2: git file reset to head
git checkout HEAD -- my-file.txt
git fetch origin
git reset --hard origin/master
git checkout HEAD -- my-file.txt