Development/Staging server on Heroku

Deploying with heroku is as easy as just pushing your master branch. However, this does not work for me as I manage different branch for development and staging. If I push these branches to heroku (different instance), it won’t work. It is because Heroku considers only master branch for deployment.

The work-around is very easy with the power of git. All you need to push your WHAT-EVER local branch to master on git. Please make sure you’re not doing this to your production instance.

I’ve created another instance that I will use solely for development test. My local development branch of git is named ‘develop’. So this is what I need to run

git push heroku-dev develop:master

Here, heroku-dev is the name of my git remote server for testing. I’m pushing my local develop branch to remote’s master branch. Now, heroku will respect your wish :).