Reputation: 16506
Doesn't seem to be a way to do it from the command line, and when I do this from the site, I run into this issue when I try to git push heroku master
:
! No such app as [previous app name].
Is this as simple as changing how I point to the app in git?
Upvotes: 60
Views: 41041
Reputation: 3541
to rename app use:
heroku apps:rename --app <old_name> <new_name>
then, remove remote heroku:
git remote rm heroku
and add new one:
heroku git:remote -a <new_name>
and push changes:
git push heroku <branch_name>:main
Upvotes: 3
Reputation: 21
If you want to rename your heroku app use: heroku apps:rename new_name
Please replace "new_name" with the name you want to give your app. make sure you do not include any "https://" because this will give you an issue. simply replace new_name with your app name
e.g heroku apps:rename grapefruitblog
After doing this, heroku requires that you update git remotes for all other local checkouts of the app. you can do this by running this command: heroku git:remote -a new_name
Again, replace new_name with the name you previously put in
e.g heroku git:remote -a grapefruitblog
Upvotes: 1
Reputation: 41
If you are changing the name of the app on the webpage you should Updating Git remotes
git remote rm heroku
heroku git:remote -a newname
https://devcenter.heroku.com/articles/renaming-apps
Upvotes: 4
Reputation: 787
heroku rename new-name-app
always works for me but for additional information on rules, follow this page.
Upvotes: 2
Reputation: 13887
Why use all caps?
heroku apps:rename my_new_app_name
Here is a great place to find out more:
How to rename your Heroku application
In case anyone is curious this method does not require any further configuration, your modifications should be immediate. At the time of this writing I was able to change the name of my app in seconds, and then do so again if I wished. Hope this helps.
Upvotes: 58