Note that there are some explanatory texts on larger screens.

plurals
  1. POGit push current branch to a remote with Heroku
    primarykey
    data
    text
    <p>I'm trying to create a staging branch on Heroku, but there's something I don't quite get.</p> <p>Assuming I've already created a heroku app and setup the remote to point to staging-remote, If I do: </p> <pre><code>git checkout -b staging staging-remote/master </code></pre> <p>I get a local branch called 'staging' which tracks staging-remote/master - or that's what I thought....</p> <p>But:</p> <pre><code>git remote show staging-remote </code></pre> <p>Gives me this:</p> <pre><code>remote staging Fetch URL: git@heroku.com:myappname.git Push URL: git@heroku.com:myappname.git HEAD branch: master Remote branch: master tracked Local branch configured for 'git pull': staging-remote merges with remote master Local ref configured for 'git push': master pushes to master (up to date) </code></pre> <p>As you can see, the pull looks reasonable, but the default push does not. It implies that if I do:</p> <p>git push staging-remote</p> <p>I'm going to push my local master branch up to the staging branch. But that's not what I want.... Basically, I want to merge updates into my staging branch, then easily push it to heroku without having to specify the branch like so:</p> <pre><code>git push staging-remote mybranch:master </code></pre> <p>The above isn't hard to do, but I want to avoid accidentally doing the previous push and pushing the wrong branch... This is doubly important for the production branch I'd like to create!</p> <p>I've tried messing with git config, but haven't figured out how to get this right yet...</p>
    singulars
    1. This table or related slice is empty.
    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. 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