Search code examples
pythondjangogitherokugit-remote

Heroku how to update git remotes after project rename


I already renamed my project to PROJECT_NAME on Heroku and should I update project git remotes,

This is Heroku guide:

$ git remote rm heroku
$ heroku git:remote -a PROJECT_NAME

But when I run the first command, I'm getting this error:

fatal: No such remote: heroku

Solution

  • The first command git remote rm heroku will remove your local direction repository git remotes were linked to your online Heroku repository and it will continue without any error.

    But if Heroku git remotes not already made or it was deleted, the terminal will show you this error: fatal: No such remote: heroku

    Then you should create Heroku git remotes with the second command: heroku git:remote -a PROJECT_NAME.

    This explanation applies to any git remotes, not just Heroku