Last Updated: February 25, 2016
·
12.17K
· jgtr

Make Heroku run a non-master branch

I frequently want to push a non-master branch to Heroku.

Unfortunately, if it is a non-master branch, Heroku won't build it. Example:

$ git push heroku-dev test
counting objects ...
...
Pushed to non-master branch, skipping build.
To git@heroku.com:example-dev.git
* [new branch]      test -> test

So instead, use the following command to push the non-master branch to Heroku's master branch, so that it will build it:

$ git push heroku [name-of-your-branch]:master

Once you are ready to push master, then:

$ git push -f heroku master:master

Source: http://stackoverflow.com/questions/14593538/make-heroku-run-non-master-git-branch