I recently set up dev/staging/production environment on OSX Lion. I have a git repo with a development and a master branch, and a Heroku instance with master and staging origins.
The basic workflow is to develop in the development branch, merge into master, deploy to staging, then finally deploy to production.
I’d like to prevent Heroku deployments when I’m in any branch that isn’t master, or at a minimum display a warning (e.g. “Would you like to continue? y/n”).
Is this possible? Is there a git or Heroku feature that facilitates this, or would I need to write a bash script?
From the Heroku documentation: