git-pull-request
git-pull-request copied to clipboard
Fetching from refs/pulls instead
I'm curious why not just pull from refs/pulls/[PR#]/head instead of trying to fetch from the original contributor's branch?
This fails in cases when the remote branch was deleted or doesn't exist. As is the case for the PR 13 on this repo for example.
git fetch -fu origin refs/pulls/13/head:pr-13
git checkout pr-13
(Along lines of https://gist.github.com/gnarf/5406589)
seems like a more straightforward approach, but I'm not sure if there are nuances I don't know of behind your method.
Simply because I didn't know about this when I wrote the tool ;-)