Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@voxpelli
Last active July 19, 2016 18:36
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voxpelli/1b06b4ae3f2c691786a2 to your computer and use it in GitHub Desktop.
Save voxpelli/1b06b4ae3f2c691786a2 to your computer and use it in GitHub Desktop.
How to get references to all PR:s on a "git fetch origin" – forgot where I found this, but rediscovered the setup in one of my local repos

In the .git/config file add the fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to the remote you want to fetch references to PR:s from.

[remote "origin"]
url = git@github.com:voxpelli/node-pg-pubsub.git
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment