Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku create should not name remote as "heroku"

Tags:

heroku

When I do

heroku create

then a remote is added with name heroku.

I want that name to be changed to "heroku1". Is it possible?

I know it might be a bad practice but we have a complicated situation.

like image 847
Nick Vanderbilt Avatar asked Jul 29 '11 19:07

Nick Vanderbilt


People also ask

Can you change heroku app name?

It is possible to rename an application by using the heroku:rename command. The application becomes accessible by the new name immediately, and the old name should not be used anymore to address it.

Are heroku app names unique?

After a second or two, Heroku will have created a new app and have chosen a random name for it. This ensures that your app name is globally unique across the entire Heroku platform, making it possible to use the app name as a part of your domain name.


2 Answers

Not bad practice at all - I very rarely even have heroku in there at all - it's just a name for how you want to refer to the remote. I typically use development or production.

To rename a remote is easy;

git remote rename heroku heroku1
like image 111
John Beynon Avatar answered Sep 28 '22 09:09

John Beynon


You can specify the name of the remote as part of the heroku create command, as well:

heroku create --remote heroku1

There are other useful options as well, heroku help create for details.

I don't see why it's bad practice — the name should be whatever helps you (or any other developers on the project) understand the process. For example, one of my apps has two Heroku remotes, staging and heroku. The staging app lets us test things out and is just on the free service level, where the heroku app is the live user-facing site, and is scaled up appropriately.

like image 32
danhallock Avatar answered Sep 28 '22 07:09

danhallock