Search code examples
githeroku

deploy the project again with new app on Heroku


I happened to delete the app that I configured with my project on GitHub. Now when I'm trying to deploy the project with an app in another Heroku account, it's showing this: $ git push heroku remote: ! No such app as agile-atoll-98419. fatal: repository 'https://git.heroku.com/agile-atoll-98419.git/' not found

and

$ heroku open ! Couldn't find that app.

Please guide


Solution

  • You need to remove the previous remote:

    git remote rm heroku
    

    Then add it with the new app name:

    git remote add heroku https://git.heroku.com/<app name>.git
    

    Further pushes will happen on your new app instead of the old one.

    Alternatively for next time, if you remove the remote first, heroku create will set the new remote for easier pushing.