how to reset a file to master in git code example Example: git reset file to master git checkout origin/master [filename]