Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Do I Remove references to an old Heroku app in local git folder?

Tags:

git

heroku

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.

like image 969
djpATLSF Avatar asked Jun 05 '14 22:06

djpATLSF


People also ask

How do I unlink Heroku from GitHub?

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.

How do I change my Heroku link?

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.


1 Answers

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
like image 128
Ismail Badawi Avatar answered Oct 16 '22 13:10

Ismail Badawi