heroku 如何更改Git远程仓库?

yyhrrdl8  于 11个月前  发布在  Git
关注(0)|答案(2)|浏览(147)

考虑(在PowerShell中):

cd C:\.dev\despesas-python
heroku create app-despesas-pessoais-python

字符串
输出量:

»   Warning: heroku update available from 7.53.0 to 8.0.5.
Creating ⬢ app-despesas-pessoais-python... done
https://app-despesas-pessoais-python.herokuapp.com/ | https://git.heroku.com/app-despesas-pessoais-python.git


还有:

git push heroku main


输出量:

remote: !       No such app as radiant-gorge-67370.
fatal: repository 'https://git.heroku.com/radiant-gorge-67370.git/' not found


还有:

git push heroku main app-despesas-pessoais-python


输出量:

error: src refspec app-despesas-pessoais-python does not match any
error: failed to push some refs to 'https://git.heroku.com/radiant-gorge-67370.git'


还有:

git push heroku app-despesas-pessoais-python


输出量:

error: src refspec app-despesas-pessoais-python does not match any
error: failed to push some refs to 'https://git.heroku.com/radiant-gorge-67370.git'


我想部署到https://git.heroku.com/app-despesas-pessoais-python.git,但一个错误给了我。它无法将一些引用推送到'https://git.heroku.com/radiant-gorge-67370.git'。有没有办法连接到新的Heroku仓库地址?

yrwegjxp

yrwegjxp1#

要更改Git仓库的远程仓库,您需要更新heroku远程仓库的Git远程URL。您可以通过以下步骤执行此操作:
1.通过在终端中运行git remote -v命令检查当前远程URL。
1.通过运行git remote rm heroku命令删除当前Heroku远程。
1.通过运行heroku git:remote -a app-despesas-pessoais-python命令添加新的Heroku远程。
1.通过运行git remote -v命令验证是否已正确添加新的远程控制。
1.通过运行git push heroku main命令将您的更改推送到新的Heroku远程。

n3ipq98p

n3ipq98p2#

步骤3 -添加新的Heroku远程:git remote set-url heroku https://git.heroku.com/app-despesas-pessoais-python.git
步骤4 -将更改添加到存储库:git add .
第5步-将更改提交到存储库:git commit -m [file]
步骤6 -推送到存储库:git push heroku main

相关问题