“GitHub公共仓库任何分支(而不仅限于分叉)”

huangapple go评论69阅读模式
英文:

github public repos anyone branch (instead of only fork)

问题

我希望任何人都能在我的公共GitHub存储库中创建分支。我已经为主分支启用了保护。我希望任何人都能够创建分支,而不仅仅是复制。

我该如何实现这个权限设置?

英文:

I want anyone to be able to make a branch in my public github repos. I have turned on protection for the main branch. I want anyone to be able to branch, not just fork.

How do I accomplish this permission setting?

答案1

得分: 1

GitHub不允许任何人修改他人的存储库,无论存储库是公共的还是私有的。这有很多原因,包括当任意人可以修改存储库时,很难信任存储库的内容在安全性和功能方面。即使您不关心这一点,其他人也依赖于存在这种安全模型。

允许人们贡献到您的存储库的唯一方法是分叉或明确将他们添加为您的存储库的贡献者。

英文:

GitHub doesn't let just anyone modify someone else's repository, whether the repository is public or private. There are many reasons for this, including that it makes it hard to trust the contents of a repository in terms of security and functionality when arbitrary people can modify a repository. Even if you don't care about this, other people rely on this security model existing.

The only way to allow people to contribute to your repository is either forking or explicitly adding them as contributors to your repository.

答案2

得分: 1

我相信任何具有仓库访问权限的协作者都可以创建分支。

但如果您在谈论非协作者的人,也许如果您创建一个分支保护规则,并在名称中添加通配符 * 符号,并取消选中所有选项,可能会起作用。

英文:

I believe any user with access to the repo as a collaborator can create branches.

But if you are talking about people who are not collaborators, maybe if you create a branch protection rule and in the name add the wildcard * symbol, and uncheck all options, could work.

huangapple
  • 本文由 发表于 2023年6月30日 04:02:49
  • 转载请务必保留本文链接:https://go.coder-hub.com/76584284.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定