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.
Try to update the git remote for the app:
git remote rm heroku
git remote add heroku [email protected]:yourappname.git
The Answer by James Ward is also correct, alternatively try doing this:
1). open a terminal
2). Go to your_app_directory/.git/config
3). Once you open the config file then edit as follows:
Change
url = [email protected]:old_app_name.git
to
url = [email protected]:new_app_name.git
Obviously substituting your apps old name to its new name. Hope it helps Also checkout this link renaming from cli - heroku
git remote rm heroku
heroku git:remote -a newname
From the Heroku docs...
If you rename from the website ... [your app] will need to be updated manually:
git remote rm heroku
heroku git:remote -a newname
There is another way, you can fix it by renaming the app to the original name via web.
To find out the old name use heroku command line:
> heroku rename newname
which will spit out the old name. Use the old name to rename the app via web. You can check if renaming success by running
> heroku info
Once done you can rename to the preferred name by using
> heroku rename preferredname
James Ward's solution didn't work for me. I had to enter my git url in a different format:
git remote rm heroku
git remote add heroku https://git.heroku.com/appname.git
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