Last Updated: February 25, 2016
·
6.844K
· sowjumn

Created a heroku app but I want to change the name now???

Have you wondered when you just type heroku create and you get an arbit name and you are really scratching your head how the hell I should deal with changing git remotes and updating the name of the app. you are at the right place.

Step 1: heroku create

This will create an app on heroku with an arbitrary name

step 2: git remote -v

Shows the url of the remote servers you have configured. 

step 3: git remote rm heroku

Go to your app on heroku and rename it there from settings of the app and save the newname. Now come back to the commandline you were previously working and continue with the following steps.

Step 4: git remote add heroku git@heroku.com:newname.git

Step 5: You can recheck if the remote url is changed using git remote -v

Step 6: git push heroku master

Push your app to heroku

YAY you are done.

References: I used various resources to post this blog.Some of them are StackOverflow, http://git-scm.com/book/en/Git-Basics-Working-with-Remotes, http://git-scm.com/book/en/Git-Branching-Remote-Branches and more..

2 Responses
Add your response

Why so mcuh steps. You can simply rename existing heroku by simply using rename command.
"heroku rename new_name"
it will automatically rename both the local and remote server (heroku) at one step.

over 1 year ago ·

Seems like heroku has a command line option ha. Anyways updating git remotes is a good one to know. thanks

over 1 year ago ·