fox
fox

Reputation: 16506

What's the correct way to rename a heroku app?

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

Answers (9)

Vova
Vova

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

Abimbola Bamgbelu
Abimbola Bamgbelu

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

Arturia Pendragon
Arturia Pendragon

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

abdul waheed
abdul waheed

Reputation: 41

Use this:

heroku apps:rename --app old_name new_name

Upvotes: 4

Nirupa
Nirupa

Reputation: 787

heroku rename new-name-app

always works for me but for additional information on rules, follow this page.

Upvotes: 2

Anthony
Anthony

Reputation: 14279

heroku apps:rename new_name --app old-app-name

^ worked for me

Upvotes: 14

jasonleonhard
jasonleonhard

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

Thupten N Chakrishar
Thupten N Chakrishar

Reputation: 69

Try this command:

heroku rename new_app_name

Upvotes: 2

mipadi
mipadi

Reputation: 410722

Did you try heroku apps:rename NEWNAME?

Upvotes: 68

Related Questions