I am in a pickle and would really appreciate it if someone could help me out.
Initially, I had two feature branches: branchA and branchB
It was decided that branchB belongs to branchA, hence I promptly and happily merged branchB into branchA.
Now, branchA continued to grow, and after the merge a considerable amount of new features were added to what was branchB (now branchA + branchB).
For a while I kept the original branchB alive, and did my best to keep it up to date with whatever features were added to branchA, so as to (ideally) have the same changes on both branches, and eventually merge branchB into Master, then merge branchA into Master as well.
Then it hit me:
I know this question might seem stupid, but I am trying to understand what the ideal flow would be in this case, considering it affects a large scale project, so any suggestions and comments are more than welcome!
is there a real good reason to do this, apart from maintaining a duplicate of branchB?
I don't think there is any good reason to waste time and effort in maintaining a duplicate branch. In a perfect world, you will have only one branch per one feature.
As a feature became bigger and bigger and code spreads in different files it became really hard to keep your changes in two different branches, and the most important thing is that you don't need to do it because at some point you want to merge everything to master.
will this duplicate situation potentially lead to conflicts ...
It really depends on how you keep the branchB up to date with changes from branchA, if you cherry-pick
each commit, no, but if you move the changes in some different way, most likely you will have conflicts.
... and is it good practice?
I don't consider anything which makes your life harder a 'good practice'.
I think that every company has its own rules for 'good' and 'bad' practices, but in all of the companies, I have worked this is considered a bad one.
theoretically speaking, doesn't branchA now be an independent feature branch and... is it fair to call branchB a "zombie branch"?
It seems like branchA is an independent feature branch and branchB should be deleted as not needed and in order not to cause confusion.