4 ms·
Checkout github pull requests locally
- tomjakubowski 14y agoDefunkt'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 https://github.com/defunkt/hub
- ch0wn 14y agoThat'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` https://github.com/addyosmani/todomvc/pull/473`
- calinet6 14y agoI cannot believe I didn't know this existed. Worth checking out!
- propelledjeans 14y agoHub is wonderful. Everyone reading this, use it! :)
- hwh 14y agoBe 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.
- lifeisstillgood 14y agoInterrupting 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
- deleted 14y ago[deleted]
- ben_straub 14y agoThe 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 14y agoI'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 14y agoI 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.
- propelledjeans 14y ago'doh! Thanks!
- kyleslattery 14y agoAlso, if you delete the original branch that the PR refers to, the PR branch still has all of the commits.
- dksidana 14y agoloved it