On Thu, Sep 14, 2017 at 11:23 AM, Colin Finck <colin(a)reactos.org> wrote:
Hi all!
After playing around with GitHub's features in
https://github.com/colinfinck/sandbox for the last few days, it turns
out that its server-side settings hardly prevent repository mess.
Although I have set master to be a "protected branch" and enabled the
option "Require branches to be up to date before merging", it allows me
to push just everything that doesn't rewrite history. This includes any
kind of merge commits, even the nasty automatic merges that occur when
you commit to your outdated local master and then do the requested "git
pull" before pushing.
GitHub Staff confirmed to me that GitHub has no way of enforcing a
rebase-only workflow. For a self-hosted Git, a simple pre-receive hook
like
https://stackoverflow.com/a/5493549 would do the trick.
For what it's worth, GitLab does actually support this on
GitLab.com,
and the self-hosted option has it too. This lets you preserve the
model as-is.
The feature is in the EE variant, but it's moving to CE:
https://gitlab.com/gitlab-org/gitlab-ce/issues/20076
--
真実はいつも一つ!/ Always, there's only one truth!