简体   繁体   中英

developer vs release branch gitflow

I'm new to gitflow so have a few questions.

Do we really need the developer branch? What purpose does it serve?

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. Feature branches are where developers code and then with a pull request merge to the relevant release branch.

What am I missing here?

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:

  • master
  • develop

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM