Is it possible to clone only certain commit from a git repo with depth 1?

pip package manager allows installing from various VCS including git:

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

  • Reuse GIT_WORK_TREE in post-receive hook to rm a few files
  • Bower install: No versions available
  • How to get file's relative path in git aliases with parameters?
  • Remote anonymous access to repository denied?
  • Github GET on private repo with access token
  • RStudio: git add --all from the UI
  • -e git://
    -e git+
    -e git+ssh://

    Passing branch names, a commit hash or a tag name is also possible:

    -e git://
    -e git://
    -e git://

    This is nice when the package is small, however, it becomes quite slow when the package is huge (e.g. Django). If I need just the last commit of master branch, then I could use --depth 1 parameter for git clone.

    Is it possible to get only a certain commit without the full repo history in general? At least from github?

  • What happens if I mistakenly push a local branch to master
  • git + LaTeX workflow
  • What are currently the problems with Git on Windows
  • catch 22 with git permissions for private repos
  • why do it get : when i press git log command
  • How to use git filter.gitignore.clean to filter both branches during a diff
  • 3 Solutions collect form web for “Is it possible to clone only certain commit from a git repo with depth 1?”

    You can neither clone nor fetch from remote a particular commit, much less a depth of 1, due to security reasons:

    To the best of my knowledge, no. You may want to ask about this on the git mailing list.

    You can use GitHub API to get last/any commit:

    It’s not a git command, you’ll need to make a HTTP request, parse JSON response and download files with diff-data.

    Git Baby is a git and github fan, let's start git clone.