Pin a VCS install to a tag, branch, or commit.
Section: VCS and Direct URLs
Install from a specific Git ref
bash
bash
python -m pip install git+https://github.com/pallets/click.git@8.1.7Explanation
Pinning a ref improves reproducibility versus floating branches.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing VCS and Direct URLs
Install from a Git repository over HTTPS
Install a package directly from a Git repo.
Install from a direct archive URL
Install from a remote source archive or wheel URL.
Install current project in editable mode
Install a local project with editable imports.
Write frozen versions to requirements.txt
Generate a pinned requirements file from the active environment.