Squash Merge Everything? Why “Clean” Git Histories Might Be Hurting Your Team

TLDR;
Introduction: The Squash Merge Hype—And Its Hidden Costs
In the world of modern software development, few debates are as persistent—or as polarizing—as the one over Git merge strategies. Scroll through developer Twitter or browse GitHub discussions, and you’ll find a chorus of voices insisting that “squash merging should be the default.” The argument? Squash merges keep your main branch history clean, simple, and easy to navigate. But is this obsession with tidiness actually making your team less effective?
Let’s dig into the real impact of squash merging, why merge commits and even the much-maligned git merge
still matter, and how your choice of workflow can make or break your project’s success.
The State of Git Merging: What Are Your Options?
Today, GitHub and similar platforms offer three primary ways to merge pull requests. The classic merge commit preserves every commit from the feature branch, tying together the histories with a new merge commit. Squash and merge, by contrast, condenses all changes into a single commit, while rebase and merge reapplies each commit from the feature branch onto the base branch, creating a linear history.
Squash merging has become the darling of many open-source and fast-moving teams, but merge commits remain the default in large organizations and legacy codebases. Rebasing, meanwhile, is often the tool of choice for those who want a linear history and are comfortable with the risks of rewriting commit history.
The Case for Squash Merging: Clean, Simple, and… Superficial?
Advocates for squash merging point to its ability to keep the main branch history uncluttered, making it easier to follow and review. It also streamlines rollbacks—one commit, one revert—and allows code review to focus on the end result, not the incremental steps. For small teams, solo projects, or feature branches with lots of “WIP” commits, squash merging can be a real productivity booster. In fact, MoldStud reports that teams using squash merging see up to a 30% increase in code review efficiency, while SkillApp notes that simplified commit logs can reduce onboarding time for new developers by as much as 20%.
Yet, there’s an uncomfortable truth here: squash merging is often a band-aid for deeper workflow problems. It can hide the messy reality of collaboration, erase valuable context, and make debugging a nightmare. When you squash, you lose the story of how a feature evolved—what was tried, what was abandoned, and why. This loss of context can be a real problem when you’re trying to understand the evolution of a complex feature or track down the root cause of a bug.
The Counterpoint: Why Merge Commits (and Even Rebasing) Still Matter
Merge commits, for all their messiness, preserve the full, human story of how software is built. They retain granular commit history, which is invaluable for debugging and auditing, and make it easier to track individual contributions—crucial for large teams and regulated industries. Advanced Git tools like git bisect
rely on detailed commit logs, and merge commits support these workflows.
Industry experts like Mitchell Hashimoto (HashiCorp) and Lloyd Atkinson argue that merge commits are essential for projects where traceability and accountability matter. Some open-source maintainers have even reverted to merge commits after finding that squash merges made it harder to understand the evolution of their codebase.
Rebasing, meanwhile, offers a compromise: a linear history without losing individual commits. But it comes with its own risks—rewriting history can cause confusion and conflicts, especially in shared branches. Still, teams that use rebasing effectively report up to a 20% increase in productivity due to fewer merge conflicts and a more navigable history (MoldStud).
The Data: What Do Teams Actually Prefer?
Surveys and anecdotal evidence suggest a split. Squash merging is favored by fast-moving startups, open-source projects, and teams prioritizing simplicity. Merge commits dominate in large enterprises, regulated industries, and projects with complex collaboration needs. Rebasing is popular among advanced teams who value a linear history and are comfortable with Git’s intricacies. According to the 2023 Stack Overflow Developer Survey, 60% of respondents use squash merging regularly, but over 35% still rely on merge commits for at least some workflows. Meanwhile, Owen Thrives highlights that teams using merge commits often report better traceability and easier compliance audits, even if their histories are messier.
The Real-World Impact: When “Clean” History Backfires
Here’s where things get controversial: defaulting to squash merging can actually hurt your team. When you squash, you lose the story of how a feature evolved—what was tried, what was abandoned, and why. If a bug is introduced, it’s much harder to pinpoint the exact change that caused it. Individual contributions are obscured, which can demotivate developers and complicate compliance audits. In regulated industries like finance, healthcare, or aerospace, detailed commit history isn’t just nice to have—it’s a legal requirement. And in large, distributed teams, merge commits are often the only way to make sense of who did what, when, and why. Mergify and Reddit discussions are full of stories where teams had to revert to merge commits after squash merging made debugging and audits nearly impossible.
Language and Ecosystem Nuances: One Size Does Not Fit All
The right merge strategy can depend on your tech stack and project structure. In monorepos, which are common in JavaScript and TypeScript ecosystems, squash merging can make it hard to track changes across multiple packages. For compiled languages like C++ or Rust, detailed commit history helps with bisecting regressions and understanding build failures. In scripting languages such as Python or Ruby, squash merging may be less risky, as changes are often smaller and easier to review. The point is, context matters—a lot, and what works for a small Python project may be disastrous for a sprawling C++ codebase.
A Balanced Approach: Context Over Dogma
So, should you squash merge everything? Absolutely not. Should you never squash? Also no. The best teams are pragmatic. Use squash merging for small, isolated features or when cleaning up noisy histories. Use merge commits for large, collaborative features, regulated environments, or when traceability matters. Use rebasing for personal branches or when you need a linear history—just don’t rebase shared branches. And above all: document your workflow, and make sure everyone on your team understands the trade-offs. As Medium and the Pro Git Book both emphasize, there is no one-size-fits-all solution.
Further Reading and Resources
For those who want to dive deeper, check out these resources:
- GitHub Docs: About Pull Request Merges
- Pro Git Book: Branching and Merging
- Medium: Git Branching Strategies—Merge vs. Rebase vs. Squash
- Stack Overflow: Squash vs. Merge vs. Rebase
- MoldStud: Mastering Git Merge Strategies
- SkillApp: Mastering Squash Merge in Git
- Owen Thrives: Squash vs Merge
- Mergify Blog: Merge Commit vs Squash
- Reddit: Should You Squash Merge or Merge Commit?
- Mitchell Hashimoto: Merge Commit vs Squash
- Lloyd Atkinson: Should You Squash Merge or Merge Commit?
Conclusion: Don’t Let “Clean” Histories Fool You
Squash merging is a powerful tool—but it’s not a silver bullet. The relentless pursuit of a “clean” Git history can actually make your team less effective, less accountable, and less able to respond to real-world challenges. Choose your merge strategy based on your team’s needs, your project’s complexity, and your industry’s requirements—not on what’s trendy. Controversial take? Maybe. But in software, nuance beats dogma every time.