Say we have a a web app under git. We are doing localization, so we have a long running topic branch ‘loc’. We are also doing a new skin that would go with the l10n, so we have a long running topic branch ‘skin’.
We would like to have separate branches for each, but the issue is that the two features are entangled. When you do l10n work, the length of the translated messages and other things affects the skin. Likewise if you make changes to the skin, that might require some modifications to messages or other l10n features. From another angle: when we make changes in ‘loc’ and we want to test, we would like to have recent working copy of ‘skin’, and the other way round.
So how to best handle this situation – do we just use a single branch, do we make both branches feed into an intermediate branch ‘skin-plus-loc’ where we do the tests then merge into dev, do we keep merging the tips of the two branches into each other maybe? or do we keep merging dev into them? What’s the best practice for handling such case.
See “When should you branch“.
Branch are for isolating a development effort, allowing to have separate tasks evolving independently one from another.
If your two tasks (skin and localization) are tightly linked, they should be in the same branch. And separate from the
devbranch.