如何使用现有的 git 存储库部署 heroku

Win*_*cca 1 git heroku

我一直在开发一个存储库,现在正在将它推送到 heroku。我浏览了 heroku 以获得指南 https://devcenter.heroku.com/articles/git

我检查以确保我有 git 和 heroku 配置。

git remote -v
Run Code Online (Sandbox Code Playgroud)

我取回了一个 heroku 配置和一个用于获取和推送的 git 配置

heroku git:remote -a path name
Run Code Online (Sandbox Code Playgroud)

但是,我回复“找不到那个应用程序”所以我输入了

heroku apps
Run Code Online (Sandbox Code Playgroud)

我的应用程序不在那里。所以我错过了一些东西。我按照说明操作,可以验证我的遥控器。不知道我错过了什么。

Iga*_* S. 5

首先删除heroku遥控器

git remote rm heroku
Run Code Online (Sandbox Code Playgroud)

再次正确添加

git remote add heroku https://git.heroku.com/sleepy-escarpment-1894.git
Run Code Online (Sandbox Code Playgroud)

然后推送你的应用

git push heroku master
Run Code Online (Sandbox Code Playgroud)