PrettyGit
Get started

How to write a good README for a GitHub repository

Updated 25 November 2026

Short answer

A good repository README tells a visitor what the project does, why it is useful, how to install and use it, and how to get help or contribute, in that order. Put a one-sentence summary and a working quick-start near the top, because most readers never scroll past the first screen.

Step by step

  1. Name and one-line summary. Say what it is and who it is for in one sentence under the title.
  2. Show it. Add a screenshot, demo GIF or short code sample so readers see the result before reading details.
  3. Quick start. Give the shortest path from zero to running: install command, minimal usage, expected output.
  4. Details. Features, configuration, and API or CLI reference, each under its own heading.
  5. Help and contributing. Explain how to report bugs, ask questions and contribute, and state the license.

The sections, in order

  • Title and summary: what it does in one sentence.
  • Badges: build status, version and license. Three or four, not twenty.
  • Preview: screenshot, GIF or code sample.
  • Quick start: install and a minimal example.
  • Features: short bullets.
  • Usage and configuration: the details people come back for.
  • Contributing, license and credits.

A template to copy

# project-name

One sentence: what it does and who it is for.

![Preview](docs/preview.png)

## Quick start

```bash
npm install project-name
```

```js
import { run } from 'project-name'
run()
```

## Features

- Fast: ...
- Simple: ...

## Contributing

Issues and pull requests are welcome.

## License

MIT

Let the repository write the first draft

PrettyGit reads your repository, its files, languages, CI workflows, releases and contributors, and suggests a README with the right sections already filled in. You edit it in place on a copy of the GitHub page and pick one of 30+ skins, each with a light and dark version that follows the reader's GitHub theme.

FAQ

How long should a README be?
As short as possible while still answering what, why and how. Move long reference material into a docs folder or wiki and link to it.
Should a README have images?
Yes, one preview near the top helps more than any amount of text. Keep images light so the page loads fast.
Does GitHub support dark mode images in READMEs?
Yes. Use the picture element with a prefers-color-scheme source so readers on dark theme get a matching image.
Generate a README for my repo