This is an unpleasant result of the master
vs main
controversy.
Your local GIT client created a default branch called master
(when you initialized the repo with git init
), but the remote repository on GitHub has no master
– instead the default branch is called main
.
Solution A – if you want to name the branch master
Run git push -u origin master
instead of git push -u origin main
Or Solution B – if you want to name the branch main
Run git checkout -B main
before git push -u origin main
CLICK HERE to find out more related problems solutions.