reset local branch state to remote branch state git code example Example: how to reset git master branch by remote git fetch origin git reset --hard origin/master