-1

I just created a new repo and it had the "main" branch as the default branch. When I try to push to main I get the following error

error: failed to push some refs to

However, if I create a new branch master, I can push to it without any problem.

1 Answers1

0

For your first push, assuming your are on the local branch main yourself, you would do:

git push -u origin main

If you are on a local master branch:

Then the git push -u origin main will work.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283