I'm hosting on Heroku. When I push:
git push master Heroku
I get the error:
error: src refspec master does not match any. error: failed to push some refs to '[email protected]: etc ...'
The “src refspec master does not match any” error occurs if you have forgotten to add the files you have changed to a commit and try to push those changes to a remote repository before you make the first commit in your repository.
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
This is work for me:-
git push heroku HEAD:master
I have experienced the problem. I solved this problem like this
make file whatever
commit
push
$ touch readme $ git add . $ git commit -m "init" $ git push heroku master
I don't know why.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With