我一直在heroku上部署到一个应用程序。我决定创建一个管道,并将此应用程序设置为生产应用程序。我创建了一个用于登台的新应用程序。
使用git push heroku master将本地代码链接到哪个app并推送到哪个应用程序?它是临时应用程序还是生产应用程序?
我是否需要运行命令让我的本地回购知道我希望将其发送到暂存应用程序?
答案 0 :(得分:0)
我是否需要运行命令让我的本地回购知道我希望将其发送到暂存应用程序?
请参阅“Heroku: Managing Multiple Environments for an App”
命令是:
git config heroku.remote staging
设置完成后,所有
heroku
命令都将默认为staging
应用 要在生产应用程序上运行命令,只需使用--remote production
选项。
OP Joshua Foxworth添加in the comments:
事实证明,即使在运行config命令之后,我仍然必须指定暂存应用程序。
git config heroku.remote staging
然后:
git push staging master