Chapter 3: Branching, Merge and GitHub PRs
3.8 Common PR mistakes (fix these early)
| Mistake | Better habit |
|---|---|
PR title = update |
Say what and why: Add health endpoint for load balancer |
| 40 unrelated files | Keep one purpose per PR when you can |
| No description | Three bullets: what changed, how tested, how to roll back |
| Secrets in the diff | Review the Files tab for .env, keys, passwords |
Merge without pulling latest main |
Update main, merge/rebase your branch, then open/refresh PR |
Squash vs merge commit. Squash folds feature commits into one on main — tidy history. Merge commit keeps the branch shape. Follow whatever the repo settings say; both are fine when the team agrees.
Ravindra Bagale's Tip
PR description madhe "how I tested" ek line mandatory samja — curl status, screenshot nahi tar command output. Reviewer time vachto. Dhyan rakho!
Practice task
Write a sample PR description (five lines max) for adding GET /health to badge API. Include test evidence and rollback (revert merge / redeploy previous tag).