Search code examples
pythongithubpipfork

Pip installing cloned forked repositories for local and production use


I just forked a github repo I'm interested in customizing for my project. I cloned my fork so I have a local copy to work on but now how do I use this cloned copy for my project--maybe a pip install <cloned local repo> command I can use? And when I'm done how will this translate in my requirements.txt file when I move everything to production?

I know I can install using

pip install -e git+git://github.com/user/repo.git@master

but I want to use the cloned copy on my computer if possible so I don't have to keep pushing any changes I make as I make them.


Solution

  • File URI scheme

    pip install 'git+file:///home/user/example/.git'
    pip install 'git+file:///home/user/example/.git@master'
    pip install 'git+file:///home/user/example/.git@0123456789abcdef0123456789abcdef'