What am I missing here?
To be blunt...everything.
You elect to use Git Flow to avoid messes with commits that you're not sure made their way into production, to keep accurate track of which commits are where, and to reduce the headache of everyone integrating everything into one branch at once with a lot of conflicts and missed assumptions.
Let's start from the top:
Do we really need the developer
branch? What purpose does it serve?
In Git Flow proper, there are two branches proper:
In this scenario, master
contains code that is considered production ready. If you had to, you could deploy the tip of master at any instant and you would be alright. develop
, or developer
, is where the actual development happens; there are things that need to be integrated here and tested together, so that's where this happens. You want to do this here to insulate yourself from any bugs that may crop up.
We can very well have a master branch where everything gets merged to production level. Then for each release we have release branches which get deployed to production for release.
This means that the master
branch serves only one role: it's an integration point. You can no longer claim that master
is production-ready code.
That said, Git Flow isn't for everyone. It may be the case that your master
branch has a lot of really good regression tests that would allow you to commit directly to it, and you would be able to roll back in case of a disastrous release.
But, if you want to use Git Flow, you have to subscribe to the notion that work is tested on a separate integration branch before it's merged to master.