Skip to content

Instantly share code, notes, and snippets.

@kshreve
Created December 27, 2017 14:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kshreve/b42ea30bdd17a64af19ddd7824681500 to your computer and use it in GitHub Desktop.
Save kshreve/b42ea30bdd17a64af19ddd7824681500 to your computer and use it in GitHub Desktop.
Pulling code from a PR. Add this to your Git Config
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "upstream"]
url = https://github.com/OrgName/ProjectName.git
fetch = +refs/heads/*:refs/remotes/upstream/*
Change your upstream config to look like this, with the added bottom line
[remote "upstream"]
url = https://github.com/OrgName/ProjectName.git
fetch = +refs/heads/*:refs/remotes/upstream/*
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
Now, a `git fetch upstream` will also fetch the pending PR's.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment