I've having issues trying to form a proper branching strategy for my mean stack app deployment.

Heroku creates staging and prod branches for my web app so I'm a bit confused if I need my own staging branch?

Currently I have this: feature -> dev -> staging -> heroku staging (the staging branch seems useless)

Also, Heroku allows you to promote heroku staging to heroku prod, so there's no point in making master push to heroku prod.

I'm thinking of making my strategy to the following, but wasn't sure of any pitfalls or anything I'm overlooking long term.

feature -> dev -> master -> heroku staging -> manual promote to heroku prod.

Any suggestions?

  • 1
    I only have master and dev branch under github CD, heroku deploys the master, and me and my friend worked on dev
  • 2
    @devTea I'd rather not switch to github. But it has a really neat feature of review branches it deploys when you push a feature branch. I believe they're temporary.
  • 1
    @uroboros I use it mainly for the CD as heroku doesn’t support gitlab
  • 1
    You can deploy via git. You don't need github or Gitlab. Im using bitbucket and I simply do a git push to heroku staging.
  • 1
    And I don't want duplicate sources of my Repo.
Add Comment