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
- Write a clear title summarizing the change.
- Add a description explaining why and what changed.
- Link related issues or tickets.
- Include testing steps and screenshots if applicable.
- 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.