apache / www-site

The ASF Website
Apache License 2.0
46 stars 108 forks source link

Keep only Squash and merge button #363

Closed tisonkun closed 6 months ago

tisonkun commented 6 months ago

In https://github.com/apache/www-site/pull/362 we found intermediate merge commit can cause the commit history hard to read. Thus, I propose to leave only the "Squash and merge" button to make it clear that we always squash the whole PR into one commit on merging.

tisonkun commented 6 months ago

@sebbASF here is the patch.

If you look at PR https://github.com/apache/www-site/pull/334 that has more than 1 commit, and Squash and Merge is enabled.

Yes. I mean:

the PR is squashed when it is applied to the target repo

This is not always applied but depends on the committers' actions.

image

They can choose any of these three and the default is on personal bias (namely, merge commit the preset, and then default to your last action on a specific repo).

tisonkun commented 6 months ago

Since @bproffitt actively maintains this repo, I'll wait a bit for his opinion on this.

jerpelea commented 6 months ago

I think that "rebase and merge" should be used to avoid the merge commits

tisonkun commented 6 months ago

I think that "rebase and merge" should be used to avoid the merge commits

Literal "Rebase and merge" can still bring the author's merge commit into the main branch, while it does not create a new merge commit on merge.

But I agree that sometimes one PR contains multiple portions of changes and is suitable for rebase and commit, while it can be theoretically separated into multiple PRs.

tisonkun commented 6 months ago

"squash and merge" will impact the git statistics since more commits may be squashed in 1 commit

Exactly. However, we don't chase for statistics here, do we? :D

jbonofre commented 6 months ago

"squash and merge" will impact the git statistics since more commits may be squashed in 1 commit

Exactly. However, we don't chase for statistics here, do we? :D

I don't think so.