renamed heroku app from website, now it's not found

GitHeroku

Git Problem Overview


After renaming my heroku app from the heroku website, whenever I cd to its directory in a terminal and run any heroku command, I get App not found. Does anybody know of a way to remedy this?

Git Solutions


Solution 1 - Git

Try to update the git remote for the app:

git remote rm heroku
git remote add heroku git@heroku.com:yourappname.git

Solution 2 - 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 http://devcenter.heroku.com/articles/renaming-apps">renaming from cli - heroku

Solution 3 - Git

git remote rm heroku
heroku git:remote -a newname

Solution 4 - Git

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

Solution 5 - Git

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

Solution 6 - Git

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionConnorView Question on Stackoverflow
Solution 1 - GitJames WardView Answer on Stackoverflow
Solution 2 - GitHishalvView Answer on Stackoverflow
Solution 3 - GitJuan Pablo RinaldiView Answer on Stackoverflow
Solution 4 - GitreergymerejView Answer on Stackoverflow
Solution 5 - GitMoh Hasbi AssidiqiView Answer on Stackoverflow
Solution 6 - GitDarryl MendonezView Answer on Stackoverflow