In our current workflow, developers always create a new branch off of develop, work independently, push their changes to the remote development branch. Sometimes the work of one developer has a dependency on the work of another. In this situation, the developer whose work depends on the other will merge the feature branch with the needed code into their own, and develop against that. In an ideal world, they will remember to frequently pull from the other feature branch. The flow looks like this:
However, since the world is not ideal, sometimes we'll wind up with merge conflicts going into a release because the developers will have different versions of the dependent code in their branches, or worse there might be some "zombie code" laying around their branch. I'm thinking of proposing that in these situations where the work of one developer has a dependency on another, that we should treat the work as a single feature, and both devs should work off of the same branch, like this:
However, I'm wondering if this is "best practice" or if it really confers a benefit as I think it does. How do others deal with this situation?