how to "reset remote" branch to be just like local main branch code example Example: how to reset git master branch by remote git fetch origin git reset --hard origin/master