Skip to content

Instantly share code, notes, and snippets.

@rageshkrishna
Created January 14, 2014 04:14
Show Gist options
  • Save rageshkrishna/8412945 to your computer and use it in GitHub Desktop.
Save rageshkrishna/8412945 to your computer and use it in GitHub Desktop.
Working with Github pull requests locally
1. Identify the pull request number from the Github UI (let's assume it's 1234 for this discussion)
2. If you haven't already cloned the upstream master that you want to merge in to, do so with the usual `git clone whatever`
3. To get the pull request as a new branch locally, `git fetch origin +refs/pull/1234/head:remotes/origin/pr_1234
4. You now have a new branch in your local clone named "pr_1234". You can now switch to the branch and look around. Whenever you're ready you can merge the branch in to master.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment