git reset local to origin branch code example Example: git reset origin branch git checkout mybranch git reset --hard origin/mybranch