Interview Prep/Git & GitHub/Branching strategies, pull requests and code review

How do you review a teammate's PR locally?

BeginnerConceptBranching strategies, pull requests and code review
Answer

Fetch the PR head ref or use the GitHub CLI.

gh pr checkout 482
git fetch origin pull/482/head:pr-482
git diff origin/main...pr-482
All Git & GitHub questions Roadmap: Git & GitHub

More on Branching strategies, pull requests and code review