
Checkout github pull requests locally - DanielRibeiro
https://gist.github.com/piscisaureus/3342247
======
tomjakubowski
Defunkt's hub tool adds a ton of GitHub-friendly commands to git, including
the ability to check out a pull request and create one from the command line.

<https://github.com/defunkt/hub>

~~~
ch0wn
That's part of my workflow, too. The nice part is, that you can use the URL of
the PR, e.g. `hub checkout <https://github.com/addyosmani/todomvc/pull/473`>

------
hwh
Be sure to read the full discussion (as of now) - it mentions further options
(like global configuration) and some important points - like the order of
fetch config statements.

------
ben_straub
The downside with this approach is that, with active projects, you end up with
hundreds of remote branches. They'll never get deleted with `fetch -p`, and if
you remove them manually they'll just come back.

------
propelledjeans
I'm not quite sure I understand. Why would you checkout a PR over the pushed
remote branch that the PR references?

e.g. I push feature/foo to origin and open a pull request base develop. Why
would one not just pull down feature/foo?

~~~
BMorearty
I had the same question, but then I realized where this tip is useful: for
open-source projects where the PR came from someone else's fork. With this
tip, you don't have to add the forked remote in order to pull it.

~~~
kyleslattery
Also, if you delete the original branch that the PR refers to, the PR branch
still has all of the commits.

------
lifeisstillgood
Interrupting work to visit the github site is a pain, so glad to see these
tools out. I had assumed hub was github internal so I will give that a try

------
dksidana
loved it

