How to use the CONTRIBUTING.md generator
- Enter the Project name and GitHub repository (owner/name). The repository adds clone and cd commands and a link to its issues.
- List Setup commands, one per line, such as
npm install. - Enter the Test command and Lint command. Clear a field to leave that check out.
- Describe Branch naming, for example
type/short-description, and choose a Commit style. - Tick Link a code of conduct and Issue reporting section as needed, set the Licence, and save the file as
CONTRIBUTING.md.
What it does and when to use it
First-time contributors often give up on the practical questions: how do I run this, which tests matter, what should my branch be called? A CONTRIBUTING.md answers them once, so maintainers do not repeat the same review comments. Write one when a project starts receiving outside pull requests, or before you ask for help on an issue.
The guide refers to other files that you can generate here. Its pull request steps ask contributors to fill in the template from the pull request template generator. If you choose Conventional Commits, enforce them with the commitlint config generator. The licence named at the end should match the file from the license generator.
How it works
The guide is built in a fixed order: a thank-you line, the optional code of conduct sentence, the optional issues section, development setup, required checks, branches, commit messages, five pull request steps, and the optional licence section.
Setup and check commands go into bash code blocks. The branch section turns your pattern into an example by swapping type for fix and short-description for login-redirect, so type/short-description becomes fix/login-redirect. Conventional Commits links to the specification and shows fix(auth): handle expired tokens.
Worked examples
Defaults. The setup block starts with git clone https://github.com/asharao/invoice-parser.git and cd invoice-parser, then npm install; npm test and npm run lint appear as required checks. The branch and licence sections read:
## Branches
Create a branch from `main` named `type/short-description` (for example `fix/login-redirect`).
and “By contributing, you agree that your contributions will be licensed under the MIT licence that covers this project.”
Plain commits, no code of conduct. Commit style set to plain summary lines: the guide asks for a summary under 72 characters “in the imperative mood”, such as “Add retry to uploader”, followed by a blank line and details.
Limits and tips
- Placeholders in angle brackets or braces are filled with sample values, so
feature/<ticket>-<name>gets the examplefeature/123-login-redirect. Check the example reads well for your own pattern. - The pull request steps are generic. Add project rules such as signed commits or changelog entries yourself.
- Run every command in the guide on a fresh clone before you publish it.
Frequently asked questions
Where does GitHub look for CONTRIBUTING.md?
The guide links a Code of Conduct. Do I need that file?
Which commit style should I pick?
My default branch is not main. What should I change?
Does the licence line make contributions legally binding?
How do we know nothing is uploaded? Test it yourself on the privacy proof page.