Is there a way to set a default app for Heroku Toolbelt?

Rafael Oliveira picture Rafael Oliveira · Jul 6, 2013 · Viewed 11.5k times · Source

I have more than one app/git remote at heroku and I would like to know if it is possible to configure a default application so that, whenever I forget to specify the app (--app), the toolbelt would use it.

Answer

ryanbrainard picture ryanbrainard · Jul 9, 2013

You can set the heroku.remote key in your repo's Git config to the name of the default remote. For example, if your remote is called staging, you could do this:

$ git config heroku.remote staging

To see how this works, here is the relevant source.

For more, information about this, see Managing Multiple Environments for an App.