4

I'm trying to install from a pull request. I followed the advice from that thread and did:

pip3 install git+https://github.com/username/reponame.git@LastCommitFromPullRequest

I got the error:

fatal: reference is not a tree: LastCommitFromPullRequest

What did I do wrong?

For reference, the pull request I'm trying to install is this one and the exact command I ran was:

pip3 install git+https://github.com/tweepy/tweepy.git@c130d708c3bda84666c2a5eef69d276cdeb17e86

Pauline
  • 3,566
  • 8
  • 23
  • 39

1 Answers1

4

The commit that you're referencing (c130d708) is part of an open pull request that comes from a fork of the original repository. This means that while the PR is open, you won't find that commit in the original repo, just in the fork. You can fix your pip command by replacing the url of the original repo with the url of the fork:

pip3 install git+https://github.com/fitnr/tweepy.git@c130d708c3bda84666c2a5eef69d276cdeb17e86

You can also reference the branch name instead of the commit:

pip3 install git+https://github.com/fitnr/tweepy.git@video_upload

But this will fail if the branch gets deleted from the fork.

jjst
  • 2,631
  • 2
  • 22
  • 34