revert a file to master version code example Example: revert file to master version git git checkout -- filename