You can also rebase directly on the remote branch

    git fetch
    git rebase origin/main