Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 如何将我的应用程序推送到heroku?_Git_Heroku - Fatal编程技术网

Git 如何将我的应用程序推送到heroku?

Git 如何将我的应用程序推送到heroku?,git,heroku,Git,Heroku,我使用以下命令创建了一个应用程序: (env) user:heroku create this-testingapp (env) user:git add . (env) user: git commit -m "app" (env) user:git push heroku master 在这里,我注意到我犯了一些错误,中途停止推送,转到我的heroku帐户删除此应用程序,然后重新开始: (env) user:heroku create secondattempt (env) user:gi

我使用以下命令创建了一个应用程序:

(env) user:heroku create this-testingapp
(env) user:git add .
(env) user: git commit -m "app"
(env) user:git push heroku master
在这里,我注意到我犯了一些错误,中途停止推送,转到我的heroku帐户删除此应用程序,然后重新开始:

(env) user:heroku create secondattempt
(env) user:git add .
(env) user:git commit -m "another try"
(env) user:git push heroku master

但在最后一个命令中,我得到了这个错误
remote:!没有此测试应用程序。

您已删除应用程序,但尚未删除/更改遥控器。因此,您需要为新应用设置新的遥控器。 在终端中键入此代码,然后再次尝试推送该代码

git remote add heroku https://git.heroku.com/secondattempt.git
< >编辑:如果您想更改远程,(如果它表示远程已经存在,那么您可以考虑更改远程名称)


然后你需要更换遥控器。使用答案中提到的命令。我已经编辑了答案并添加了其他命令。
git remote rm heroku  
heroku git:remote -a secondattempt