GitHub's pull requests are built on top of Git's native refs system. As outlined in the GitHub help page checking out pull requests locally, it is possible to fetch
pull requests to your local machine:
Manually modify the
.git/config
file in your repository to add a newfetch
line to whatever your GitHub remote is called (if you don't know, this is probablyorigin
):[remote "origin"] url = git@github.com:<USERNAME>/<REPO_NAME>.git fetch = +refs/heads/*:refs/remotes/origin/* # Add this new line: fetch = +refs/pull/*/head:refs/pull/origin/*
Now
fetch
from your remote:git fetch origin
Check out a pull request:
git checkout pull/origin/123
This will let you compile / test the pull request and decide if you wish to accept it using GitHub's web UI.