git command to discard changes in working directory code example
Example 1: git reset one file
git checkout HEAD -- my-file.txt
Example 2: git remove my local changes and pull from master
git reset --hard <your commit hash key>
git checkout HEAD -- my-file.txt
git reset --hard <your commit hash key>