我无法将 master 推送到 Heroku 以部署我的 Heroku 应用程序。
当我输入此代码时:
git push heroku master
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
error: src refspec master does not match any.
error: failed to push some refs to 'git@heroku.com:evening-scrubland-91960.git'
Run Code Online (Sandbox Code Playgroud)
git@heroku.com:evening-scrubland-91960.git我的应用程序的名称在哪里。
如果有帮助,我将使用此网站作为教程:https : //devcenter.heroku.com/articles/getting-started-with-python#deploy-the-app
我还使用了以下网站的以下建议: 我想要推送并获取错误:src refspec master 不匹配任何
小智 12
如果您仍在使用“master”而不是“main”,您也可能会收到上述错误。
而不是: “git push heroku master”
尝试: “git push heroku main”
日志告诉你一切:
src refspec master does not match any意味着主分支上还没有提交任何内容。
请确保您已使用git add命令暂存更改并使用git commit命令提交更改,然后再将其推送到远程。