Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching from refs/pulls instead #14

Open
bdowling opened this issue Jan 30, 2017 · 1 comment
Open

Fetching from refs/pulls instead #14

bdowling opened this issue Jan 30, 2017 · 1 comment

Comments

@bdowling
Copy link
Contributor

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.

@splitbrain
Copy link
Owner

Simply because I didn't know about this when I wrote the tool ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants