-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Hi! Big fan of this workflow, thanks for all the write up around it. It has been working great for us with our CI/CD.
One question about merging topics into other topics when they depend on each other.
Your recommendation is to:
create your topic and merge the other topic into it. This explicitly records the dependency relationship between the topics, and puts the commit resolutions (if any) on the right branch.
But
if topic B depends on another topic A that has not yet graduated to master, topic A may be merged into topic B. This complicates interactive branch rebases so this should be avoided when possible, however if necessary, git should handle this situation without too much problem.
Interactive rebasing to clean up commit history etc is an obvious pain point here, that would be nice to avoid.
But my main concern is this use case:
If Topic B depends on Topic A and both are in development, I merge Topic A into Topic B and do some work. But Topic A is still being developed and I need to pull in the newest features again into Topic B, a second merge commit in this case would complicate rebasing and history even more. What would be your thoughts in this case?
Instead of merging topic dependencies, wouldn't it be better to keep them rebased during development? And maybe only merge the dependency when it graduates by first getting rid of the depending commits:
git rebase --onto master topic-a topic-b
and then merge topic a into topic b to record the dependency?
While this is a solution, it's not the cleanest one imho, as it relies on best effort from everyone to rebase and merge correctly when necessary.
I'd love to hear any ideas for a better approach :)