Summary: Pull requests
The mechanical loop
Section titled “The mechanical loop”- Branch (L5)
- Push the branch:
git push -u origin <branch-name> - Open a PR on the platform UI
- Write the description (canonical structure)
- Request reviewers
- Address review comments (push fixes as new commits)
- Get approval
- Merge (pick a strategy)
- Delete the branch
The canonical PR description structure
Section titled “The canonical PR description structure”## What this changes## Why this matters## How it was tested## Notes for the reviewerOptional: Screenshots, Breaking changes, Migration plan, Rollback plan.
The three merge strategies
Section titled “The three merge strategies”| Strategy | What it does | When to use |
|---|---|---|
| Merge commit | Creates merge node with two parents; preserves all branch commits | Long-lived feature branches, when history matters |
| Squash | Combines all branch commits into one new commit on main | Short-lived feature branches with messy WIP commits (most common default) |
| Rebase | Replays branch commits as new commits on top of main | Teams that want linear history with all commits preserved (advanced) |
Code review, author etiquette
Section titled “Code review, author etiquette”- Read your own diff first
- Run tests locally
- Self-review with comments
- Respond to every reviewer comment
- Push fixes as new commits (don’t force-push during review)
- Disagree with explanation, not silence
Code review, reviewer etiquette
Section titled “Code review, reviewer etiquette”- Respond within 1 business day
- Review the code, not the person
- Be specific
- Tag blocking vs non-blocking (
blocking:/nit:) - Approve when good enough, not perfect
The 8 anti-patterns to avoid
Section titled “The 8 anti-patterns to avoid”- The mega-PR
- The unrelated changes PR
- The PR with no description
- The PR that updates over time without re-summarizing
- The PR that includes generated code in the diff
- The PR with no tests
- The PR opened on Friday at 5pm
- The “I’ll just merge it myself” PR
The institutional memory principle
Section titled “The institutional memory principle”A good PR description answers “why does this code exist?” for the future debugger reading git blame six months from now. Three minutes of writing pays off in hours saved over the lifetime of the code.
What you carry into L7
Section titled “What you carry into L7”You can open, describe, review, and merge PRs. L7 covers what happens when two branches both modified the same lines and you have to resolve the conflict. The PR loop continues to work; you just add a conflict-resolution step before merge.
Voice anchor
Section titled “Voice anchor”Git stores snapshots. Every other command is just navigating those snapshots.
A pull request is a proposal to merge one set of snapshots into another.