Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bored to write app name in every heroku command though I got only 1 app [duplicate]

Heroku toolbelt is always forcing me to write an app name at the end like this:

heroku pg:reset DATABASE --app [app_name]

Is there a way to set the default app to which all my CLI heroku commands will apply?

like image 384
John Denisov Avatar asked Jul 09 '13 18:07

John Denisov


People also ask

How do I add an app name in heroku?

Renaming an application This command succeeded because we typed inside the application folder. If you want to change the application name from outside the Git checkout or application folder, you can type the following command: $ heroku apps:rename newname --app oldname http://newname.heroku.com/ ...


2 Answers

Going to post this just in case it helps someone else out. I had the same problem even though there was only one app installed. I had to switch my heroku remote url from https to git.

https://git.heroku.com/[heroku-app-1234].git

to

[email protected]:[heroku-app-1234].git

Then everything worked normally for myself.

git remote remove heroku
git remote add heroku [email protected]:[heroku-app-1234].git
like image 63
Moemars Avatar answered Oct 16 '22 21:10

Moemars


If heroku is claiming that there are multiple apps in the folder you must have more than one remote in your .git/config.

Remove the extra heroku remote or set the default using git config heroku.remote remote_name

like image 30
Lukas Eklund Avatar answered Oct 16 '22 20:10

Lukas Eklund