How to install specific git revision/branch using pip

You can install a specific branch of repository using the pip install git+https://...@branch syntax.

This works with branches and tags:

pip install git+https://github.com/myuser/myrepo.git@mybranch

or, to select a specific revision, just use the revision ID (a shorter revision ID also works):

pip install git+https://github.com/myuser/myrepo.git@aa1edc18e0fb8dc12f550d3b0588eb2c53915097