I deleted a heroku app reinitialized the local repository but when I try to add the new remote repository it won't let me add the new remote because the remote already exists but with the old name. I tried doing a rename but that didn't work either because of course the old app no longer exists. When I run "git remote -v" I get:
heroku [email protected]:fierce-reef-7370.git (fetch)
heroku [email protected]:fierce-reef-7370.git (push)
both are referencing the old app. I have no idea how to remove these so that I can push to the new remote heroku app.
Thanks.
Go to Github and under your personal settings revoke access BUT THEN go back to Heroku, logout, login and you will see a warning from Heroku on the dashboard saying that access has been revoked from your GitHub account. Click on Disconnect on that app.
If you already changed it via the web interface, you just need to update the heroku remote's URL, which you can do with git remote set-url heroku <newurl> . You can get the new URL from the web interface.
You can use git remote set-url
to change the url:
git remote set-url heroku <new-url>
Alternatively, you can use git remote rm
to remove a remote by name:
git remote rm heroku
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