pip: how to install a git pull request

后端 未结 2 422
暖寄归人
暖寄归人 2020-11-30 08:21

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.

2条回答
  •  执念已碎
    2020-11-30 09:16

    You can add the exact commit to the URL by appending the hash:

    pip install git+https://github.com/other-repository/project.git@remote_branch_name
    

    example:

    pip install --user git+https://github.com/d1b/pip.git@fix_pip_build_directory
    

    Or to a single commit. But this does not get updated, if the pull request (remote branch) gets updated:

    pip install --user git+https://github.com/d1b/pip.git@d89b5803db2b520e754b9b26b771d22121738637
    

提交回复
热议问题