Is it possible to clone only certain commits from a git repository with a depth of 1?

pippackage manager allows you to install from various VCS , including git:

Pip currently supports cloning via git, git + http and git + ssh:

-e git://git.myproject.org/MyProject.git#egg=MyProject
-e git+http://git.myproject.org/MyProject/#egg=MyProject
-e git+ssh://git@myproject.org/MyProject/#egg=MyProject

You can also pass branch names, a commit hash, or a tag name:

-e git://git.myproject.org/MyProject.git@master#egg=MyProject
-e git://git.myproject.org/MyProject.git@v1.0#egg=MyProject
-e git://git.myproject.org/MyProject.git@da39a3ee5e6b4b0d3255bfef95601890afd80709#egg=MyProject

This is good when the package is small, but it becomes quite slow when the package is huge (like Django). If I need only the last commit of the main branch, then I could use the parameter --depth 1for git clone.

Is it possible to get only a specific commit without a complete repo history at all? At least from github?

+5
source share

All Articles