Here is a strategy and some useful Git aliases to ease deploying applications on Heroku using tags for further reference.
Tags are useful because they convey informations about when you deployed and who did it.
When you pull from a repo, you immediately see who and when the code you are pulling has been deployed.
It is also useful to quickly get back to a given reference point.
In the following aliases, we assume that master
is your production-ready branch, and develop
the place where main development happens (this is the code that gets deployed on your staging host)
We also have two remotes set-up: production
and staging
. They both point to Heroku apps repos, and I guess you understand their respective roles,
It's useful though to point out that for the staging environment, you have to force the develop
branch to be pushed on master
for Heroku.