DEV Community

Discussion on: Contribute like a Pro. A guide for git-branching model (Part 1)

Collapse
 
matthewpersico profile image
Matthew O. Persico • Edited

Apart from the main two branches, there are three other branches. All these branches should be created within develop branch.

Within? I thought that branches were separate entities; I don't think they are nested. You can create other branches based on the current HEAD of develop, but I've never heard the terminology "nested" before.

Collapse
 
maen profile image
Ruheza, NS

They're created as sub-branches of the develop, that's what i meant. Thanks

Collapse
 
matthewpersico profile image
Matthew O. Persico

I hate to be pedantic but you will confuse people with that terminology. There are no such things as "sub" or "nested" branches. They are all "branches", they all have the same properties. There's even a "default" branch (master or main), but it is still a branch. There is no "trunk" in git; it can be modeled by a branch that everyone syncs to, but that's just convention. Under the hood they are all branches. Your three other purpose branches can be described as being "branched from" or "branched off of" devel. But if you wanted to then merge them back to "master", you could, with a little git magic.