如何在Heroku多个应用中精准推送特定应用程序?
- 内容介绍
- 文章标签
- 相关推荐
本文共计442个文字,预计阅读时间需要2分钟。
使用Heroku创建新应用后,若想推送代码到test-app3,您应按照以下步骤操作:
1. 在终端中,确保您的Git仓库已经初始化并添加了远程仓库。
2.使用`git add`命令添加您要推送的代码文件。
3.使用`git commit`命令提交您的更改。
4.使用`git push`命令将您的更改推送到Heroku的远程仓库。
具体命令如下:
bash
heroku create test-app3git add .git commit -m Update code for test-app3git push heroku master注意:如果您使用的是分支,请确保在`git push`命令中使用正确的分支名,例如`git push heroku your-branch:master`。
当您在终端输入`heroku`命令查看列表时,您会看到类似以下信息:
my-apptest-app1test-app2test-app3
这表明您的应用test-app3已成功创建并添加到Heroku列表中。
本文共计442个文字,预计阅读时间需要2分钟。
使用Heroku创建新应用后,若想推送代码到test-app3,您应按照以下步骤操作:
1. 在终端中,确保您的Git仓库已经初始化并添加了远程仓库。
2.使用`git add`命令添加您要推送的代码文件。
3.使用`git commit`命令提交您的更改。
4.使用`git push`命令将您的更改推送到Heroku的远程仓库。
具体命令如下:
bash
heroku create test-app3git add .git commit -m Update code for test-app3git push heroku master注意:如果您使用的是分支,请确保在`git push`命令中使用正确的分支名,例如`git push heroku your-branch:master`。
当您在终端输入`heroku`命令查看列表时,您会看到类似以下信息:
my-apptest-app1test-app2test-app3
这表明您的应用test-app3已成功创建并添加到Heroku列表中。

