Live data from Hacker News

Git: Please Stop Squash Merging

lucasoshiro.github.io

31–32 of 32 posts

Re: Git: Please Stop Squash Merging

#31
post #10

My bad experience with squash merging was with Stash at my last job. Some developers there thought the "clean history" was so worth it they made squash-merging the default merge strategy. The result: the git repository (at least in Stash) slowed to a crawl, because the comments to the commits were several hundred MiB. It was nuts. Never seen a git hosting site go that slow before. Actually had to replace the whole re…

I never keep the comments of the commit when squash merging. Only a sensible title of the PR and the number so it can be found. All the details are then in the PR where the more nuanced discussion is had.

If you're using squash merging, yes. But I find it better to do merge commits anyway. I mean doctor up your PR so it's one commit and you can hide your mistakes, I mean, development process, before you open the PR, of course, but the button on your git-hosting tool should just be a 'merge'.

As an aside, I find myself doing amend commits all the time these days.

Post reply on HN