Cuberite Forum
Mandate Github "Squash and merge" - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Mandate Github "Squash and merge" (/thread-2431.html)



Mandate Github "Squash and merge" - LogicParrot - 04-30-2016

Github has a neat feature now: Squash and merge. What it does is squash the commits of a PR into one commit, and then merges it with Master without a merge commit. The makes history cleaner. For instance, see the last two merges in master and compare them with older merges. I think we should mandate this by unchecking "Allow merge commits" in Github. I have no access to that, so can someone please do it?


RE: Mandage Github "Squash and merge" - LogicParrot - 04-30-2016

More info here: https://github.com/blog/2141-squash-your-commits


RE: Mandage Github "Squash and merge" - worktycho - 05-01-2016

Done.


RE: Mandate Github "Squash and merge" - xoft - 05-19-2016

I don't think this is a good idea. Sometimes the PR consists of several commits, each of which makes sense to actually be a separate commit. I'm very much against forcing a squash.

Pity that the GitHub team seems to think with something other than their brains when designing new features.


RE: Mandate Github "Squash and merge" - bearbin - 05-19-2016

I also don't understand the problem with merge commits - what makes them so bad?

They seem like a good thing to me, so that the branch history is preserved.


RE: Mandate Github "Squash and merge" - LogicParrot - 05-19-2016

I don't have much against the merge commits. My main proble was the fact that we had to continuously ask people to rebase whenever the master branch changes. This adds unnecessary delays and can be rather annoying for some. With the new feature, I can squash and rebase without asking the PR submitter to do so.

As @xoft says, It's a pity we cannot selectively squash. I guess we should keep both merge methods? We'd use the squash method almost all of the time, and the old method when preserving the individual commits is desired.


RE: Mandate Github "Squash and merge" - xoft - 05-19-2016

In my opinion, merge commits can make the history very, very tangled and difficult to read, especially if attempting to bisect the history for a regression etc. Rebasing makes the history much more concise.

A mix of squash-merges and rebase-merges is probably the best solution for now.