Git-Flow and dependencies

258 views Asked by At

We're running into a strange case with, specifically with Git-Flow and I'm wondering how other developers have solved this. So here's the issue:

Dev 1 is working on feature/thing Dev 2 is working on feature/different-thing

These are independent features, but feature/different-thing is going to make changes to the API that, once released, would break stuff in feature/thing until it all gets merged.

So my question is this: if feature/different-thing finishes first...Dev 1 will need to pull those changes into her feature/thing branch. Using Git-Flow what's the right approach this this...would she simple "finish" her feature, merging her changes into develop then branching again? That doesn't seem safe...should she just do a git pull origin develop in her branch?

1

There are 1 answers

2
David Deutsch On BEST ANSWER

When working on a feature branch, it is a good idea to merge the develop branch into your feature branch regularly, so that you a) know that all will work when you merge back into develop and b) can avoid huge merge conflicts. So that is what I would suggest here, for both feature branches. That way, if feature/different-thing finishes first, the author of feature/thing will see that it has broken her work and fix the code accordingly before merging back into develop, and visa-versa.