Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change git url for app on Heroku

Tags:

git

heroku

When I run "git remote -v" from Terminal I get the following:

heroku  [email protected]:obscure-taiga-9581.git (fetch) heroku  [email protected]:obscure-taiga-9581.git (push) origin  http://coastguard-quiz.herokuapp.com/ (fetch) origin  http://coastguard-quiz.herokuapp.com/ (push) 

I want to replace the "[email protected]:obscure-taiga-9581.git" part. How do I do that?

like image 912
lavapj Avatar asked Feb 24 '13 17:02

lavapj


People also ask

How do I change my Heroku url?

Summary of stepsAdd the custom domain to your app with the heroku domains:add command. Look up the Heroku-supplied DNS target for the custom domain using the heroku domains command. Configure your app's DNS provider to point to the Heroku-supplied DNS target. Confirm that your app is accessible via the custom domain.

How do I rename my Heroku app url?

If you want to rename your app, run heroku apps:rename [newname] in the app folder and swap out newname with the name that you want to change to. You can also see a complete list of Heroku apps that you're a creator or contributor to by running heroku apps .


2 Answers

I assume what you want to do is push to coastguard-quiz repo which is on heroku, so that when you git push heroku it updates the caostguard-quiz.herokuapp.com.

git remote rm heroku git remote add heroku [email protected]:coastguard-quiz.git 
like image 110
Wing Lian Avatar answered Sep 29 '22 11:09

Wing Lian


I'm not sure how it'll affect Heroku, but you can change the path in .git/config

like image 21
pdoherty926 Avatar answered Sep 29 '22 13:09

pdoherty926