I recently set up my staging and production server environments on Heroku and everything is working great. Through Heroku, you can deploy from a Git branch - e.g. master
or my-feature
. This got me thinking - should I have a dev
branch?
The dev
branch would essentially function as the current stage in development
; branch my-feature
would be merged into dev
once it was completed. I would then deploy dev
to my staging environment and, if everything checks out, I would merge dev
into master
, and deploy master
to production.
At first glance, to me this makes sense as a workflow. Looking at the branches, it is immediately evident what is in development and what is in production. With the usual master
branch being actively developed and deployed, it's difficult to draw the line at a glance without looking at timestamps or SHA commit hashes.
The only downside I can see is that my commit logs would basically have a merged dev
with master
commit for every deploy to production. Personally I don't see this as a big problem, because it helps in defining the line what code is production using?.
Does having a dev
branch make sense if it is used in this way?
PS - I'm working alone on this project. I'm just curious if this makes sense as a general workflow for developers.