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,从,我只能这样做: heroku create (将有一个具有生成名称的Heroku存储库) 然后,如果我想重命名它(无论如何,我必须这样做),我将执行以下操作: git remote rename generated-name the-name-i-want 但如果我想创建一个具有自定义名称的Heroku存储库,我不能使用终端部署我的代码: heroku create the-name-i-want git push heroku master 抛出错误 fatal: 'heorku

从,我只能这样做:

heroku create
(将有一个具有生成名称的Heroku存储库)

然后,如果我想重命名它(无论如何,我必须这样做),我将执行以下操作:

git remote rename generated-name the-name-i-want
但如果我想创建一个具有自定义名称的Heroku存储库,我不能使用终端部署我的代码:

heroku create the-name-i-want

git push heroku master 
抛出错误

fatal: 'heorku' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: 'the-name-i-want' does not appear to be a git repository
fatal: Could not read from remote repository.

抛出错误

fatal: 'heorku' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: 'the-name-i-want' does not appear to be a git repository
fatal: Could not read from remote repository.
如何使用git将代码部署到具有自定义名称的heroku?
我使用Windows 10。

您混淆了两个概念:
heroku
在示例中是git remote的名称,而不是应用程序的名称

让我们了解一下:
git-push-heroku-master
将当前分支推送到名为
heroku
的远程分支
master

当您
heroku创建-name-i-want
时,仍然会得到一个名为
heroku
的git遥控器

当您要更改遥控器的名称时,而不是

git remote rename generated-name the-name-i-want
使用

那你可以

git push the-name-i-want master
这就是为什么出现错误
致命:“the-name-i-want”似乎不是git存储库


使用
git remote-v

检查您的远程名称和URL您混淆了两个概念:
heroku
在示例中是git remote的名称,而不是应用程序的名称

让我们了解一下:
git-push-heroku-master
将当前分支推送到名为
heroku
的远程分支
master

当您
heroku创建-name-i-want
时,仍然会得到一个名为
heroku
的git遥控器

当您要更改遥控器的名称时,而不是

git remote rename generated-name the-name-i-want
使用

那你可以

git push the-name-i-want master
这就是为什么出现错误
致命:“the-name-i-want”似乎不是git存储库


用git remote-v检查您的远程名称和URL@非常高兴!