Push origin master error on new repository
I had the same issue. I deleted the .git folder then followed the following commands
$ git init
$ git add .
$ git remote add origin [email protected]:project/project.git
$ git commit -m "Initial version"
$ git push origin master
I was having the same issue and then smacked myself in the head because I hadn't actually added my project files.
git add -A
git commit -am "message"
git push origin master
The error message leads to the conclusion that you do not have a master
branch in your local repository. Either push your main development branch (git push origin my-local-master:master
which will rename it to master
on github) or make a commit first. You can not push a completely empty repository.