You can add a README file to your repository to tell other people why your project is useful, what they can do with your project, and how they can use it.


You can add a README file to a repository to communicate important information about your project. A README, along with a repository license and contribution guidelines, communicates expectations for your project and helps you manage contributions.

For more information about providing guidelines for your project, see "Setting up your project for healthy contributions."

A README is often the first item a visitor will see when visiting your repository. README files typically include information on:

  • What the project does
  • Why the project is useful
  • How users can get started with the project
  • Where users can get help with your project
  • Who maintains and contributes to the project

If you put your README file in your repository's root, docs, or hidden .github directory, GitHub Enterprise Server will recognize and automatically surface your README to repository visitors.

Main page of the github/scientist repository and its README file

如果将 README 文件添加到与用户名同名的公共仓库的根目录,则该 README 将自动显示在您的个人资料页面上。 您可以使用 GitHub Flavored Markdown 编辑您的个人资料以在您的个人资料 README,以在您的个人资料上创建个性化的区域。 更多信息请参阅“管理个人资料自述文件”。

README file on your username/username repository

Auto-generated table of contents for README files

For the rendered view of any Markdown file in a repository, including README files, GitHub Enterprise Server will automatically generate a table of contents based on section headings. You can view the table of contents for a README file by clicking the menu icon at the top left of the rendered page.

README with automatically generated TOC


github/scientiorist 仓库的自述文件中的部分链接


相对链接是相对于当前文件的链接。 例如,如果在仓库根目录下有一个自述文件,而在 docs/CONTRIBUTING.md 中有另一个文件,则自述文件中的 CONTRIBUTING.md 的相关链接如下所示:


GitHub Enterprise Server 将根据您当前使用的分支自动转换相对链接或图像路径,从而使链接或路径始终有效。 您可以使用所有相对链接操作符,如 ./../

相对链接更便于用户克隆仓库。 绝对链接可能无法用于仓库的克隆 - 建议使用相对链接引用仓库中的其他文件。


A README should contain only the necessary information for developers to get started using and contributing to your project. Longer documentation is best suited for wikis. For more information, see "About wikis."

Further reading




所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。


或者, 了解如何参与。