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