Heroku

How It Works

Renaming Apps from the CLI

Last Updated: 02 February 2011

cli rename

Table of Contents

You can rename an app at any time with the heroku rename command. For example, to rename an app named “oldname” to “newname”, change into the app’s git checkout and run:

$ heroku rename newname
http://newname.heroku.com/ | git@heroku.com:newname.git
Git remote heroku updated

Renaming an app will cause it to immediately become available at the new subdomain (newname.heroku.com) and unavailable at the old name (oldname.heroku.com). This may not matter if you’re using a custom domain name, but be aware that any external links will need to be updated.

Renaming Without a Checkout

You can rename an app while outside a git checkout by passing an explicit --app argument:

$ heroku rename newname --app oldname
http://newname.heroku.com/ | git@heroku.com:newname.git

Note that you will need to manually update any existing git remotes that point to the old name.

Manually Updating a Git Remote

You can see all remotes and the git URLs they reference by typing git remote -v. You can also see and edit the full details for all remotes in your current git repo by editing the file .git/config.

If you are inside the Git checkout directory, your remote will be updated automatically. Other checkouts, such as those belonging to other developers, will need to be updated manually:

$ git remote rm heroku
$ git remote add heroku git@heroku.com:newname.git

Replace “newname” with the new name of the app, as specified in the rename command.