TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Merge vs. Squash Merge

1 pointsby nodivbyzeroover 2 years ago
Hi HN! How do you merge your PRs? Merge or Squash &amp; Merge?<p>Thanks!

2 comments

kennethkoover 2 years ago
Assuming PRs and associated feature branches are substantial[0], I&#x27;m a proponent of merging w&#x2F;o squashing commits. When running `git bisect` or simply doing archaeology on a code base where the previous author(s) left the organization, I&#x27;ve never regretted reading granular commits--only too coarse.<p>[0] Largely depends on the team&#x27;s workflow and the functional size of feature branches. If there are a lot of smaller commits made to develop&#x2F;main&#x2F;etc., then you can probably get away with squashing.
superchromaover 2 years ago
Squash and merge, to keep the commit history clean. You can always dig up the PR to see commit by commit how it happened if you must. We&#x27;ve only done this in my organization... maybe twice in five years. Personally I don&#x27;t work elegantly enough that my commits represent some coherent narrative anyway, and it hasn&#x27;t caused enough issues in my job for me to change my ways now.