使用heroku创建应用时报错 heroku does not appear to be a git repository

时间:2023-03-09 18:31:53
使用heroku创建应用时报错 heroku does not appear to be a git repository

在跟着heroku的官方教程创建python应用时,到deploy-the-app这一步,要上传代码到heroku 的git仓库时,报的这个错误:

使用heroku创建应用时报错 heroku does not appear to be a git repository

网上一搜,相关的答案居然极少,首页只出现一篇(还好这篇里面的方法给我解决了这个问题),里面提到的方法如下:

先执行

heroku git:remote -a <这里是上一步heroku create生成的应用名字>

然后再执行git push heroku master,问题解决

参考:http://www.itkeyword.com/doc/7145320339577619x532/heroku-does-not-appear-to-be-a-git-repository