Last Updated: February 25, 2016
· iamjarvo

Use git remote name instead of heroku app name to interact with heroku

Often you will have multiple remote apps on heroku for one local app. Usually for different environments. For your app you might have a staging version and a product version. When this happens you have to use -a to specify commands to run.

A command will look like this:
heroku maintenance:on -a whirlwind-bird

It takes up memory remembering the names. Instead you can pass in the git remote name

Alternate command:
heroku maintenance:on --stage staging