Way back when, I added a no_push to prevent any direct pushing. This may help others.
git remote set-url --push origin no_push *From:* Abdelatif Guettouche [mailto:abdelatif.guettou...@gmail.com] *Sent:* Monday, April 27, 2020 10:26 PM *To:* dev@nuttx.apache.org *Subject:* Re: Direct commits to repository What I meant is what Github uses when rebasing. I guess it rebases the PR's in a topic branch on top of master then fast-forward merges. So we should be good. That being said whether we disable force pushing or not, it won't prevent us from making a non-force push to upstream from our command line. On Tue, Apr 28, 2020 at 5:12 AM 张铎(Duo Zhang) <palomino...@gmail.com> wrote: When you do 'git push -f' you will receive a failure message. And on the web UI, maybe you mean what it looks like when we disable a way to merge a PR? This is the merge option selection menu for Apache HBase, where we disable 'Create a merge commit'. [image: image.png] Abdelatif Guettouche <abdelatif.guettou...@gmail.com> 于2020年4月28日周二 下午12:07 写道: Is there some sort of an expectation for Github's web UI when we disable force pushing? Because if we disable force pushing and keep only the "Rebase merge" option, we would be "stuck". On Tue, Apr 28, 2020 at 4:52 AM Brennan Ashton <bash...@brennanashton.com> wrote: On Mon, Apr 27, 2020, 8:47 PM Xiang Xiao <xiaoxiang781...@gmail.com> wrote: Yes, after reading the github help, we can enable these two options for master branch of all nuttx projects: [image: branch.JPG] This would have to be done by INFRA. I would be fine marking master as protected on all the repos. [image: rebase.JPG] The maintainer still can create a new branch and push to that branch directly, only the master branch get the strict protection. The setting must be done by INFRA team, I can raise a JIRA ticket if the community agree that it's the right direction to go. This we can do ourselves via the .asf.yaml file in each repo. I already enumerated all the options in that file a while back, we just need to remove the ones we do not want. --Brennan