heroku create should not name remote as "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 ba开发者_开发知识库d practice but we have a complicated situation.
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.
精彩评论