If you're following the "github fork" workflow, where you create a fork and add the remote upstream repo:
14:47 $ git remote -v
origin [email protected]:<yourname>/<repo_name>.git (fetch)
origin [email protected]:<yourname>/<repo_name>.git (push)
upstream [email protected]:<repo_owrer>/<repo_name>.git (fetch)
upstream [email protected]:<repo_owner>/<repo_name>.git (push)
to pull into your current branch your command would look like:
git pull upstream pull/<pull_request_number>/head
to pull into a new branch the code would look like:
git fetch upstream pull/<pull_request_number>/head:newbranch