When the installer execute the git init, it is not specifying the name of the branch.
In my case my default branch is still "master" so when I follow the git remote steps it fails because the documentation talks about "main" branch and my branch name is "master".
I think this line:
git init 2>&1 | _log "Initializing repository"
should be:
git init --initial-branch="$DOTLY_BRANCH" 2>&1 | _log "Initializing repository"