我使用heroku create test-app3
创建了一个新的Heroku应用程序。如果我想将一些代码推送到这个新的test-app3
,我该如何做?
当我在终端中输入heroku list
时,我会看到:
我的应用程序如下:
test-app1
test-app2
test-app3
我如何推送到test-app3
? 我如何在不同的应用程序之间切换?
我使用heroku create test-app3
创建了一个新的Heroku应用程序。如果我想将一些代码推送到这个新的test-app3
,我该如何做?
当我在终端中输入heroku list
时,我会看到:
我的应用程序如下:
test-app1
test-app2
test-app3
我如何推送到test-app3
? 我如何在不同的应用程序之间切换?
https://git@heroku.com:your_app_name.git
),然后执行以下操作:git remote add test-app1 https://git@heroku.com:test-app1.git
git remote add test-app2 https://git@heroku.com:test-app2.git
git remote add test-app3 https://git@heroku.com:test-app3.git
然后,您就可以像这样将代码推送到任何特定的应用程序:
git push test-app1 master
git push test-app2 master
git push test-app3 master
你可以通过终端导航到你的应用程序,使用cd test-app3
命令,然后执行以下操作:
git add .
git commit -m "your message"
git push
最后:
git push heroku master
或者 git push heroku main
,根据你的主分支名称而定。
fatal: Not a git repository
的问题,所以我输入了git init
命令。但是现在,如果我输入git remote add test-app1
命令,会出现usage: git remote add [<options>] <name> <url>
的提示信息。我该怎么办? - JamesRockygit remote -v
命令输出是什么? - K M Rakibul Islamgit remote add test-app1 <在此处输入test-app1的gitrepo>
? 然后当你执行:git remote -v
时,应该能够看到一些东西。 - K M Rakibul Islamgitrepo
? - JamesRockyhttps://
,所以正确的 URL 是https://git@heroku.com:test-app3.git
。我已经更新了帖子以反映这一点。 - Arel