简体   繁体   English

如何用hyper推送heroku应用? 出现错误

[英]How to push heroku app with hyper ? getting error

I tried these commands:我尝试了这些命令:

截屏

error: src refspec main does not match any
error: failed to push some refs to 'https://git.heroku.com/young-brook-98064.git'

Where did I made a mistake?我哪里弄错了?

error: src refspec main does not match any means you don't have any commit to push. error: src refspec main does not match any表示你没有任何要推送的提交。

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您的第一次提交失败,因为您没有设置user.name / user.email

If you do this operations in order (tell Git who you are, make a commit, then push), it will work.如果你按顺序执行此操作(告诉 Git 你是谁,提交,然后推送),它将起作用。

I think you need to push it to master instead of main :我认为您需要将其推送到master而不是main

git push heroku master

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM