Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merging feature branches with several authors

On a web site, a feature branch needs to be merged into master after a couple of weeks of development by both front-end and back-end developers.

The problem is that the back-end developers are unlinkely to be able to solve CSS and template conflicts, and front-end developers can't solve the back-end conflicts. How would you go about solving this?

Some ideas I had:

  • One of the developers solve "their" conflicts locally and hand over patches to the other developer, who'll do the real merge
  • Partial merges somehow, splitting the merge up in several commits
  • Use a different vcs workflow/branching strategy
like image 906
Jacob Rask Avatar asked Jan 28 '26 07:01

Jacob Rask


1 Answers

One solution would be to split (rebase --interactive) the set of commits into commits with only back-end or front-end files in them, in order for each set of developers to only merge what they need.

That would assume there is no functional dependencies between the two set of codes.

We are working on a joint remote feature branch with a feature that involves both front-end and back-end code changes

If back-end is able to contribute without having to worry about front-end changes, then the merge, after split, is possible.
If not, there would still be potential conflicts when merging in a back-end codebase the set of code regarding front-end. But for that merge, you can use one of the "theirs" strategy when performing the merge.
That would allow back-end developers to get back (and override) all front-end code in their repo.

like image 196
VonC Avatar answered Jan 30 '26 21:01

VonC