Skip to main content

Best practices for enterprises

Learn GitHub-recommended practices for your enterprise.

Assign multiple owners

如果企业只有一个所有者,那么在无法联系到所有者的情况下,该企业的资源可能会不可访问。 为了保护对资源的访问,我们建议企业中至少有两个人拥有所有者角色。 For more information, see 邀请人员管理企业.

Use policies

We recommend using policies to enforce business rules and regulatory compliance.

每个企业策略控制组织级别的策略可用选项。 可以选择不强制实施策略,这样组织所有者便可为组织配置策略,也可从一组选项中进行选择,为企业拥有的所有组织强制实施策略。 For more information, see Enterprise policies.

Minimize the number of organizations

Most businesses are best served by a single organization. Some enterprises may need multiple organizations for compliance or security reasons, but try to create as few as possible. A smaller number of organizations encourages innersource practice, allows discussions to involve a wider audience, and reduces administrative overhead.

For more guidance on how many organizations to create and how to structure them, see 在企业中构建组织的最佳做法.

Avoid extensive collaboration in user-owned repositories

We recommend collaborating in organization-owned repositories whenever possible and minimizing collaboration in user-owned repositories. Organization-owned repositories have more sophisticated security and administrative features, and they remain accessible even as enterprise membership changes.

Use human-readable usernames

Use human-readable usernames, and avoid machine-generated IDs that are difficult for humans to read.

You can manage the display of usernames within your enterprise's private repositories. For more information, see 管理组织中成员名称的显示.

Create a README

为了帮助人们了解你的企业正在发生的事情,应该创建一个 README。 例如,可以使用 README 帮助成员了解企业中的不同组织、共享重要资源的链接或交流有关企业设置和策略的信息。 For more information, see 为企业创建 README.

Maintain ownership continuity

Organizations can have more than one organization owner to avoid lapses in ownership. We recommend that at least two people within each organization have the owner role. For more information, see 保持组织的所有权连续性.

Further reading