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