There are two concepts at play when adding a user friendly heroku name to a git repos.

There is the remote (git) and the app (heroku).

git remote

Git remotes are just aliases for git repositories. You can see what alias are currently setup for your git repos by typing:

> git remote -v

heroku (fetch)
heroku (push)
origin (fetch)
origin (push)

origin and heroku are the remotes – and their corresponding git repos.

origin is my git hub repos.
heroku is my remote name for my heroku git repos.

When I type:

> git push heroku

It pushes my code to the heroku git repos using the ‘heroku’ git remote name.

heroku apps

When you create an instance of your code base on Heroku, it gives your app a name. You can see your app names by typing:

> heroku apps

=== My Apps

And you can get more info (like it’s git url) by typing:

> heroku info -a secret-waters-xxxx

=== secret-waters-7537
Addons: heroku-postgresql:dev
Git URL:
Owner Email:
Region: us
Repo Size: 7M
Slug Size: 33M
Stack: cedar
Tier: Legacy
Web URL:

What we want to do is tie these things together.

Tying a remote to an app

Say I created a staging environment, and I want to replace the heroku generated name it gave me (like secret-water) with a nicer name like ‘staging’. Here is how I would do it.

> git remote add staging

Now when I list my apps I should see staging there:

> git remote -v

staging (fetch)
staging (push)

And I should be able to push to my staging environment with this:

> git push staging

If you make a mistake you can remove a remote with

> git remote rm staging

For more examples of these and other commands feel free to checkout my heroku cheat sheet: