Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What is `.github/CONTRIBUTING.md` for?

I found some repositories on GitHub that have a dot-folder .github and a file CONTRIBUTING.md in it.

Usually I knew md-files in the repositories root folder but not in a dot-sub-folder.

What is this file for? Is it linked somewhere in the GitHub web-frontend?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

That comes from 2012 "Contributing Guidelines"

Oftentimes open source projects place a CONTRIBUTING file in the root directory.

It explains how a participant should do things like format code, test fixes, and submit patches.

Here is a fine example from puppet and another one from factory_girl_rails.

From a maintainer’s point of view, the document succinctly communicates how best to collaborate. And for a contributor, one quick check of this file verifies their submission follows the maintainer’s guidelines.

As a maintainer, all you have to do is add a CONTRIBUTING file (or CONTRIBUTING.md if you’re using Markdown) to the root of your repository.
Then we will add a link to your file when a contributor creates an Issue or opens a Pull Request.

enter image description here

Since then, it is documented in "Setting guidelines for repository contributors"

It includes:

To help your project contributors do good work, you can add a file with contribution guidelines to your project repository’s root, docs, or .github folder.

So this is a new alternative location for that file.

If a repository contains more than one CONTRIBUTING file, then the file shown in links is chosen from locations in the following order:

  • the .github directory, then
  • the repository’s root directory, and finally
  • the docs directory.

From Feb. 2019

Organizations can now add community health files to a specially named .github repository to serve as organization-wide defaults for all repositories within their organization.

You can add CONTRIBUTING, SUPPORT, CODE_OF_CONDUCT, ISSUE_TEMPLATE(S), or PULL_REQUEST_TEMPLATE(S) files to a public, organization-owned .github repository, and if a given community health file doesn’t exist for a repository, the organization-wide default will be used.

While the file itself won’t appear in the file browser or Git history for each repository, it will be surfaced throughout developers’ workflows, such as when opening a new issue or when viewing the Community Profile, just as if it were committed to the repository directly.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading