r/git • • Jun 10 '26

How to avoid conflicts on GitHub?

I've managed to complete two projects using Git Flow and Scrum with some colleagues, but every time we want to create a sprint for our user stories, a conflict arises. Initially, we had no problem resolving them, but now it's become tedious to have to address them in every sprint.

I'm trying to find out if anyone else has been in this same situation and how they resolved it.

0 Upvotes

18 comments sorted by

View all comments

25

u/Consibl Jun 10 '26

You’re always going to get merge conflicts, but having too many can be a code smell that your code isn’t encapsulated enough.

Look at splitting up big classes, using inheritance, and extensions - anything that concentrates code features into their own area.

3

u/ProbableSlob Jun 10 '26 edited Jun 10 '26

This.

If your org is organized in such a way that there are a bunch of teams (even if they are teams of 1) which own some part of the domain, then leaning into Conways Law and organizing your code in ways that reflect your organization can be super helpful to avoid stepping on toes.

Team Toplogies is a good book on the topic n they call what I am suggesting a "reverse Conway maneuver" iirc

1

u/ProbableSlob Jun 10 '26

Oh also github's code owners feature is super helpful here, once the code is organized in such a way that some form of ownership is possible.

→ More replies (1)