'pip: how to install a git pull request
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.
Solution 1:[1]
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:
pip install git+https://github.com/user/repo.git@refs/pull/123/merge
Additionally, to install the unmerged version of pull request 123 (without messing with the github API to track down the original branch!):
pip install git+https://github.com/user/repo.git@refs/pull/123/head
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Audrey Dutcher |
