git overwrite local repository with remote branch code example Example: git replace local branch with remote git reset --hard origin/master