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