I want to install a git pull request with pip for testing in my local virtualenv. I want to install it directly from github, without creating a local git repository.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
You can add the exact commit to the URL by appending the hash:
example:
Or to a single commit. But this does not get updated, if the pull request (remote branch) gets updated:
A neat feature that github gives you is that it preemptively merges pull requests and makes them available as a hidden ref you can fetch specially. This is great if you're building a CI system to test pull requests.
Up until recently, pip didn't support specifying these hidden refs, but in the last month, support has landed in pip (confirmed working in 10.0.1) for this.
The following command will install the merged version of pull request 123 for
user/repo
:Additionally, to install the unmerged version of pull request 123 (without messing with the github API to track down the original branch!):