Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://www.heroku.com" rel="noreferrer">Heroku</a> links your projects based on the <code>heroku</code> git remote (and a few other options, see the update below). To add your Heroku remote as a remote in your current repository, use the following command:</p> <pre><code>git remote add heroku git@heroku.com:project.git </code></pre> <p>where <code>project</code> is the name of your Heroku project (the same as the <code>project.heroku.com</code> subdomain). Once you've done so, you can use the <code>heroku xxxx</code> commands (assuming you have the <a href="https://toolbelt.heroku.com/" rel="noreferrer">Heroku Toolbelt</a> installed), and can push to Heroku as usual via <code>git push heroku master</code>. As a shortcut, if you're using the command line tool, you can type:</p> <pre><code>heroku git:remote -a project </code></pre> <p>where, again, <code>project</code> is the name of your Heroku project (thanks, <a href="https://stackoverflow.com/a/12115798/62082">Colonel Panic</a>). You can name the Git remote anything you want by passing <code>-r remote_name</code>.</p> <p><strong>[Update]</strong></p> <p>As mentioned by Ben in the comments, the remote doesn't need to be named <code>heroku</code> for the gem commands to work. I checked <a href="https://github.com/heroku/heroku/blob/master/lib/heroku/command/base.rb" rel="noreferrer">the source</a>, and it appears it works like this:</p> <ol> <li>If you specify an app name via the <code>--app</code> option (e.g. <code>heroku info --app myapp</code>), it will use that app.</li> <li>If you specify a Git <em>remote</em> name via the <code>--remote</code> option (e.g. <code>heroku info --remote production</code>), it will use the app associated with that Git remote.</li> <li>If you specify no option and you have <code>heroku.remote</code> set in your Git config file, it will use the app associated with that remote (for example, to set the default remote to "production" use <code>git config heroku.remote production</code> in your repository, and Heroku will run <code>git config heroku.remote</code> to read the value of this setting)</li> <li>If you specify no option, the gem finds no configuration in your <code>.git/config</code> file, and the gem only finds one remote in your Git remotes that has "heroku.com" in the URL, it will use that remote.</li> <li>If none of these works, it raises an error instructing you to pass <code>--app</code> to your command.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload