Studying GitFlow, and I have some problems that I do not see in any of the documents / articles that I read about this.
At some point, the code in the develop branch must be deployed to a QA / midpoint validation environment and checked strictly. Thus, with GitFlow, you shorten the release branch from develop , and then deploy release to the specified staging environment.
Firstly, I just wanted to clarify something real: the first time a particular project / repo goes through this process, you will actually fork / create this new release branch from develop , right ? And that all other times in the future, you just combine develop into release , right ?
So, QA checks the release branch on an intermediate env, everything looks good, and we are ready to deploy in prod. You:
- Deploy to prod and then merge
release into master ?; or - Merge
release into master and then deploy to prod?
I ask because in the first case you need to expand the release branch to prod, then expand to prod, and then merge to master . Which sounds fine, but often prod and non-prod products are not identical, and the code that works fine in intermediate chokes, the second runs on prod servers. I know that GitFlow supports patch branch concepts, but they are reserved for minor fixes. In the case of a complex fix requiring rollback / rollback, we now have a "dirty code" (a code that breaks prod for some reason) merged into master .
And in the latter case, it can take several hours or even days (especially if you need to use IT / Ops to deploy prod) from the moment of merging and entering a request for release of prod at a time when prod deployment is actually happening. And during this time, you have a master branch, which says: "the functions X, Y and Z are in prod", but in fact they are not.
I am wondering if GitFlow really solves this or by some known workaround for both cases.