Every open source contributor at some point reviews pull requests. Pulling the contents of the PR locally is important to test the code. Many a times reviewers themselves want to fix stuff on the PR like merge conflicts, typos. GitHub has documentation to deal with this but I never found those simple enough so here's the way I suggest reviewing PRs:
Keep in mind upstream
refers to the original repository from which you forked and your own forked copy is called origin
.
Note: Things in UPPERCASE are placeholders for some GitHub specific values. You'll understand them by reading.
# Fetch PR
git fetch upstream refs/pull/PULLREQ_NUMBER/head:pr-PULLREQ_NUMBER