error: src refspec main does not match any
means you don't have any commit to push.
And you don't have any commit because your first commit fails.
Your first commit fails because you don't have set user.name
/ user.email
If you do this operations in order (tell Git who you are, make a commit, then push), it will work.
I think you need to push it to master
instead of main
:
git push heroku master
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.