Jonathan Yeong


Deploying a local branch onto heroku

Today I wanted to deploy a branch other than master to Heroku. I started off with:

$ git push heroku <my-branch>

That pushed but Heroku didn’t build the application. After some digging through the Heroku docs I found out that:

Branches pushed to Heroku other than master will be ignored by this command. [1]

To push a branch other than master use:

$ git push heroku yourbranch:master

This also means that I don’t need to merge my branch to master. Which is exactly what I want since my branch contains Heroku specific commits.

Resources

[1] Heroku deploy doc: https://devcenter.heroku.com/articles/git#deploying-code



Leave a comment