Git push failing after Heroku app name change

git, heroku

Solution

You need to change your git remote.

If you do `git remote -v` you should see `heroku` listed.

It will look something like:

`heroku git@github.com:my-app-staging.git (fetch)` `heroku git@github.com:my-app-staging.git (push)`

Delete that remote...

`git remote rm heroku`

...and then add the new one

`git remote add heroku git@heroku.com:my-app-staging-new.git`

Problem

I changed my app name from "my-app-staging" to "my-app-staging-new" in the Heroku dashboard. Now I can no longer push changes to it- git throws the following error: ! No such app as my-app-staging. fatal: Could not read from remote repository. How do I resolve that?

Original source

Related problems