← Back to Upcase

Pushing my local branch to Heroku master

(Kashyap Bhatt) #1

I have a repository for which I am working on my separate branch away from master branch.

Now When I try to deploy the code to Heroku, It tries to deploy the master branch of that git repository. How can I specify heroku to deploy using branch I am specifying.

I have tried using following command but it takes 0 objects (0 total, 0 reused)

git push heroku mybranch/master:master

Repository is hosted on heroku. Let me know if more output is needed.


(pat brisbin) #2

If I’m remembering correctly, you just need to reverse things:

git push heroku master:some-feature-branch

I’ve only pushed from local feature branches myself.

(Ben Orenstein) #3

@pat is correct here, but this is a great example of the kind of question that you can answer for yourself far faster by googling.

Here’s the first result from searching “push non-master branch to heroku”: https://devcenter.heroku.com/articles/git#deploying-code.

Time spent blocked? About 10 seconds.

(Kashyap Bhatt) #4

Thanks @pat and @benorenstein It works now. I tried to find using the google but I am not sure where I made mistake. I will try to be more thorough in my googling before I post here. Apologize for that.