I found that the above answer to the question by Ruslan did not work (2013?) anymore. I did not have a command to:
git branch -M main
which I did after the commit.
Also, they failed once I had that branch command because when I created the repo it had conflicting README.md and LICENSE.
My solution was to:
One warning: Do not create the README.md or LICENSE on the cloud repo. If you do, you will have to resolve the fact that the repo has files that are not reconciled with the local files. Create the new repo without these files or you will have to do the reconciliation of these files.