Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

To expand on this, you need to add the fork as an alternate remote (as opposed to origin), and then replace "origin" in the command posted prior.


So it's not possible from a fork, if you've only added the original repo as your single remote?

Currently I add the random person's fork as a remote to inspect/modify their PR branch. Was hoping for some GitHub magic to eliminate this step.


It is possible. You can specify a URL instead of a remote name for `git fetch`.


I thought it was in the PR destination repository (since they are under that repository's /pull namespace). You'd need to add the alternate remote if it's a PR into a fork (as opposed to from it), no?


You are absolutely correct. My apologies, as I understood the problem as "I have a fork and want to receive pull requests".

This can be a pretty common setup for some git workflows. Everybody makes a fork and takes / pushes pull requests or branches from their fork to others. The main advantage would be that if you have a lot of branches they don't all have to be on upstream and you don't need to have upstream permissions for everyone to push branches or changes to.

Nonetheless, I can see why my comment raised some confusion.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: