How to write a good pull request

· Category: Git

Short answer

A good pull request is small, focused, well-described, and includes context for reviewers to understand the changes.

Steps

  1. Write a clear title summarizing the change.
  2. Add a description explaining why and what changed.
  3. Link related issues or tickets.
  4. Include testing steps and screenshots if applicable.
  5. Assign reviewers and respond to feedback promptly.

Tips

  • Keep PRs under 400 lines of diff when possible.
  • Use draft PRs for early feedback on work in progress.
  • Automated checks (linting, tests) should pass before requesting review.

Common issues

  • Giant PRs are hard to review and likely to introduce bugs.
  • Missing context forces reviewers to guess intent, slowing the process.