Pushing my local branch to Heroku master

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.


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.

@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”: Deploying with Git | Heroku Dev Center.

Time spent blocked? About 10 seconds.

1 Like

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.