So, this makes doing code review much easier for me, and I just thought I'd share with the world.
Always put the original system generated fetch refs map last. Always!
The remotes below refer to the "blessed repo". More, specifically, the destination repository of the pull request, but the same concept can be used if you're accepting pull requests on your "personal" repository, as well.
$ cd /path/to/repo
$ git config remote.[remote name].fetch +refs/pull-requests/*:refs/remotes/[remote name]/pull-requests/*
$ nano .git/config
[remote "[remote name]"]
url = ssh://[email protected]/~user/repository.git
fetch = +refs/pull-requests/*:refs/remotes/[remote name]/pull-requests/*
fetch = +refs/heads/*:refs/remotes/[remote name]/*
$ cd /path/to/repo
$ git config remote.[remote name].fetch +refs/pull/*:refs/remotes/[remote name]/pull-requests/*
$ nano .git/config
[remote "[remote name]"]
url = [email protected]:joyent/node.git
fetch = +refs/pull/*:refs/remotes/[remote name]/pull-requests/*
fetch = +refs/heads/*:refs/remotes/[remote name]/*
- Local checkout of a pull request in Stash Atlassian Answers forum
- Checkout github pull requests locally GitHub gist by piscisareus - great discussion and lots of information on how others are achieving the same thing, including a few ideas on hooks and command line options.
- Checking out pull requests locally Official documentation by GitHub on their recommendations for working with PRs.
So, you've gone and messed up and didn't do that thing I told you to do about putting the system generated refs map last, and decided that you're not going to do it, even now that you're getting this colorful message about "diff.realname" variable being set too low; oh, and also, your syslog is getting spammed with messages about too many open files? I feel bad for you, son. Here's a link on how to band-aid that problem, until you come to your senses and just do what I told you to do, in the first place.
You'll eventually run into other fun errors like not being able to push changes to branches and not be able to make commits to local branches because reference names don't resolve, but don't worry - I'm sure that'll all work itself out. Or, you could just put the stupid system generated fetch reference where it belongs.