Proposal: Encourage squashing commits when merging

Konstantin Kharlamov Hi-Angel at yandex.ru
Thu May 15 16:11:19 BST 2025


On Thu, 2025-05-15 at 16:55 +0200, Felix Ernst wrote:
> Gitlab allows squashing commits while merging. I suggest to have the
> checkbox for this ticked by default. Contributors would still be able
> to untick it as they see fit.
> 
> I think "encouraging squashing" is the better default because Gitlab
> has features like the "Apply suggestion" button which produces non-
> descriptive commits by default.

I think "encouraging squashing" is a great way to encourage bad commit
history.

I see your point that a contributor may not know how to manage commit
history. Does it matter though? When someone sends a merge/pull request
to me, I compare the commit description to the actual change, and then
I point problems at the commit being reviewed. When someone adds a new
commit that fixes the previous one I as a maintainer can see the older
commit isn't fixed. As result the MR/PR wouldn't even pass review.

I understand that a maintainer may sometimes cut a contributor some
slack if maintainer isn't overloaded, in a good mood, and sees the
contributors doesn't know git basics… But this definitely doesn't
warrant making the checkbox default 😊


More information about the kde-devel mailing list