Reputation: 243
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.
Upvotes: 21
Views: 26085
Reputation: 37207
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
Upvotes: 64