Mandate Github "Squash and merge"
#1
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?
Reply
Thanks given by:
#2
More info here: https://github.com/blog/2141-squash-your-commits
Reply
Thanks given by:
#3
Done.
Reply
Thanks given by: LogicParrot
#4
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.
Reply
Thanks given by:
#5
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.
Reply
Thanks given by:
#6
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.
Reply
Thanks given by:
#7
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.
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)