how to reset a git file to a remote branch code example Example: reset branch on local git git fetch origin git reset --hard origin/master