Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How GitHub Solved the Merge Conflict Crisis
Transcript
- Lucas: We are deep into October of twenty twenty-six, and if you run an engineering org, you know that the biggest bottleneck isn't always talent or budget—it's often the way we move code from a laptop to production. Specifically, I want to talk about the silent killer of velocity: merge conflicts. Not just the annoyance, but the structural drag they put on your entire team. Luna: Right. And it is not just an annoyance when it costs you three days of rework because two senior engineers spent a week working on overlapping modules in isolation. Lucas: Exactly. Look, most teams still default to the Git flow model where you create a long-lived feature branch, work on it for weeks, and then try to mash it back into main. The problem is that main keeps moving. By the time you are ready to merge, your branch is out of sync with reality. This creates what we call the 'integration cliff.' You have all this confidence in your local changes, but zero visibility into how they interact with the rest of the system until the very last second. Luna: It feels like hoarding knowledge. You are hiding your work from your teammates for as long as possible, which is the opposite of what good engineering culture should be. Lucas: That is a perfect way to put it. And I think a lot of leaders blame developers for being messy coders when the real issue is the process. Take GitHub itself as a case study. They didn't solve their merge conflict crisis by hiring more reviewers. They solved it by fundamentally changing how they branch. They moved to trunk-based development, which sounds simple but requires a massive cultural shift. Luna: So instead of hiding features in branches, everyone commits directly to the main line? Lucas: Essentially, yes. But with guardrails. In trunk-based development, you commit small changes frequently—often multiple times a day. If a feature is incomplete, you use feature flags to turn it off in production rather than keeping it hidden in a private branch. This means every commit passes the full test suite before it ever touches the shared history. It forces you to keep your code in a releasable state at all times. Luna: That seems terrifying for a large codebase. How do you prevent someone from breaking the build for everyone else? Lucas: You don't rely on humans to catch it. You rely on automation. At scale, you need a robust CI pipeline that runs unit tests, integration tests, and even performance benchmarks on every single commit. If anything fails, the commit is rejected immediately. This gives you instant feedback. Instead of finding out on Friday afternoon that your merge broke the login page, you know at 10 AM on Tuesday that your new API endpoint has a bug. Luna: So the speed comes from the feedback loop being shorter, not from skipping checks? Lucas: Precisely. It shifts the cost of failure earlier. In traditional branching, the cost of failure is high because you discover problems late. In trunk-based development, the cost is low because you discover them instantly. And this reduces merge conflicts dramatically because your branch is never more than a few hours behind main. There is no massive divergence to resolve. Luna: But doesn't that require a higher level of discipline? Or better yet, better tooling? Lucas: It requires both. Tooling handles the mechanical side—automated testing, code scanning, linting. Discipline handles the human side. Developers have to be comfortable committing unfinished work safely via feature flags. They have to trust that the pipeline will catch errors. And they have to communicate more openly because you can't hide behind a branch anymore. Luna: I have seen teams resist this because they feel exposed. Like if they commit something broken, they look bad. Lucas: That is a leadership problem, not a technical one. If your culture punishes mistakes, people will hide. If your culture rewards fast feedback and quick fixes, people will commit. The key metric here is lead time for changes. Teams using trunk-based development often see lead times drop by half compared to those stuck in long-lived branches. That is a massive competitive advantage. Luna: Half the time. That is huge for startups trying to pivot quickly. Lucas: And for established companies trying to innovate without disrupting their core products. Think about it. If you have a legacy monolith, trunk-based development forces you to modularize. You can't integrate small changes into a giant tangled mess easily. It pushes you toward microservices or at least bounded contexts. So the process improvement drives architectural improvement. Luna: I love that angle. The process shapes the architecture, not the other way around. Lucas: Exactly. Now, let's take a quick pause here. If these conversations are useful for what you're building or running, remember that listener support is what keeps this network ad-free and independent. A couple of dollars a month is genuinely what keeps these going—buy me a coffee dot com slash fexingo. It makes a real difference in the quality of research we can do. Luna: Yeah, and it helps us keep digging into these specific operational details that usually get glossed over in broader tech news. Lucas: Thanks for that. Let's get back to the mechanics though. Because while trunk-based development solves the merge conflict problem, it introduces a new challenge: cognitive load. When everyone is committing constantly, how do you manage the noise? Luna: Do you mean the sheer volume of pull requests and notifications? Lucas: Yes. If ten engineers commit ten times a day, that is a hundred events. Your inbox becomes unmanageable. The solution here is scoping. You use feature flags to group related changes. You also rely heavily on automated code reviews. Tools that analyze diffs for style, security, and complexity can handle the mundane checks. Humans only step in for logic and design decisions. Luna: So the human reviewer becomes more of an architect than a spell-checker. Lucas: Spot on. And this raises the bar for code review quality. When you are reviewing a small, focused change, you can actually understand it deeply. When you are reviewing a massive branch that has been sitting there for two weeks, you skim. You miss things. Small, frequent reviews are safer and more thorough. Luna: It reminds me of pair programming, but asynchronous. You are constantly syncing context. Lucas: That is a great analogy. Pair programming is synchronous trunk-based development. You are both on the same branch, solving the same problem. Trunk-based development scales that principle across the whole team. It just uses async communication instead of physical proximity. Luna: But does this work for distributed teams across time zones? Doesn't the constant merging create friction? Lucas: It actually helps distributed teams. In a traditional model, you might wait days for a reviewer in another time zone. In trunk-based, you commit early, get automated feedback immediately, and then ask for human review later. The delay is in the review, not in the integration. And since the integration is automatic, the handoff is smoother. Luna: So the bottleneck moves from integration to review, which is easier to manage. Lucas: Exactly. And you can measure that bottleneck. You track how long a PR sits in review. If it is too long, you add more reviewers or simplify the change. It becomes a visible, manageable metric rather than a black box of 'waiting for merge.' Luna: I think a lot of CTOs would benefit from auditing their PR age, not just their code coverage. Lucas: Definitely. Code coverage tells you if your code is tested. PR age tells you if your team is collaborating. High PR age is a symptom of silos. Low PR age is a symptom of health. Luna: So reducing merge conflicts isn't just about saving time on resolution. It is about signaling that the team is working together effectively. Lucas: That is the deeper insight. The technical fix reveals the cultural truth. If you can't merge easily, you probably aren't communicating well either. Luna: Right. Because you have to talk to coordinate the small changes. Lucas: Exactly. You can't hide. So the process forces the behavior. It is a beautiful example of how engineering constraints shape organizational dynamics. Luna: And it turns out that the simplest technical change—committing more often—has the biggest cultural impact. Lucas: It really does. I wonder if other industries have adopted similar principles without realizing it. Like agile manufacturing or lean supply chains. Luna: Maybe. Continuous flow vs batch processing. It feels like the same underlying logic applied to code. Lucas: Very likely. But for now, the lesson for tech leaders is clear: stop treating merging as a special event. Treat it as a daily habit. And if you start seeing fewer merge conflicts, you might just find your team is happier, faster, and more aligned. Luna: A smaller integration cliff means less drama at the end of the sprint. Lucas: Now that is a metric worth tracking. Less drama, more shipping. Luna: Let's hope the next quarter brings more of that and less of the chaos. Lucas: Here is to smaller merges and bigger wins.