0

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,129,465
  • 480
  • 4,036
  • 4,755