如何在没有“---app”参数的情况下运行heroku toolbelt命令

如何在没有“---app”参数的情况下运行heroku toolbelt命令,heroku,heroku-toolbelt,Heroku,Heroku Toolbelt,我曾经运行heroku create并使用git-push-heroku-master进行部署,但后来我转向了基于Github的工作流,在该工作流中,代码首先被推送到我的Github-repo,然后通过web钩子进行部署 现在,我必须在每个命令之后运行--app appname或-appname,这会让人恼火 e、 g 如何强制heroku toolbelt将此repo链接到heroku应用程序,以便我可以在不使用--app参数的情况下运行heroku,添加一个名为heroku的远程urlhtt

我曾经运行
heroku create
并使用
git-push-heroku-master
进行部署,但后来我转向了基于Github的工作流,在该工作流中,代码首先被推送到我的Github-repo,然后通过web钩子进行部署

现在,我必须在每个命令之后运行
--app appname
-appname
,这会让人恼火

e、 g


如何强制heroku toolbelt将此repo链接到heroku应用程序,以便我可以在不使用
--app
参数的情况下运行
heroku
,添加一个名为
heroku
的远程url
https://git.heroku.com/appname.git

运行以下命令:

$ git remote add heroku https://git.heroku.com/appname.git

为我工作,知道为什么会有用,尽管?即使在名称为appname的git repo不存在的情况下(即app与repo的名称不同),也可以确认,只要您将appname.git用作上面的遥控器,此功能仍然有效。(为免生疑问,我也通过github部署,而不是问题所问的heroku git)。
$ git remote add heroku https://git.heroku.com/appname.git