I am wondering why every git workflow merge develop into the production branch.
Is there any reason why we cannot just leave the old production branches and create new ones from develop (in case we have only those two "special" branches). What is in there what need to be merged. Anyway every hotfix should be put into develop aswell. I googled and read many blogs about this but no one mentions anything about it.
We are moving to GIT from CVS and wondering what is a good way to use branching.
-
1Possible duplicate of Is git-flow in the spirit of git?gnat– gnat07/07/2016 08:36:38Commented Jul 7, 2016 at 8:36
-
1I found example what I mean: Release branches with GitLab flow docs.gitlab.com/ee/workflow/gitlab_flow.html#introductionBysmyyr– Bysmyyr07/07/2016 11:32:38Commented Jul 7, 2016 at 11:32
1 Answer 1
Well, because git-flow
defines it this way. There is really no other explanation that is not already written up in the definition of gitflow...
If you don't like that definition, you can just opt to not do it...
After all, you should think about what fits best to the way you develop your code. For some, git-flow
is the way to go, because they need the fine-grained control over the code base.
For others, git-flow
is total overkill and impose too much management overhead to be viable.
git
does not tell you how you should use it. It provides you with simple yet powerful tools to create whatever workflow you need.
-
I also think (as done in the example) it's most important to design some (branching) concept and then communicate that concept to every developer involved. Having some concept is more important than having the "right" concept. While you can do mostly anything you'd like in git, only some discipline will avoid chaos that may be hard to fix later. Some related question would be "When to remove branches that were merged elsewhere?"U. Windl– U. Windl12/28/2019 19:44:42Commented Dec 28, 2019 at 19:44