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.
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.
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With