git checkout and overwrite all files code example Example: git pull hard git reset --hard origin/master