
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
Clone a git repository via git shell command.
Install:
$ npm install git-clone
To use the original callback-based API:
const clone = require('git-clone');
As of 0.2.0 there's a promised-based API for use with async/await:
const clone = require('git-clone/promise');
git: path to git binary; default: git (expected to be in your $PATH)shallow: when true, clone with depth 1checkout: revision/branch/tag to check out after cloneargs: additional array of arguments to pass to git cloneclone(repo, targetPath, [options], cb)Clone repo to targetPath, calling cb on completion; any error that occurred will be passed as the first argument. If no error is passed the git clone operation was successful.
async clone(repo, targetPath, [options])Clone repo to targetPath, throwing an exception on failure.
© 2014-2021 Jason Frame & Contributors [ @jaz303 / jason@onehackoranother.com ]
Released under the ISC license.
FAQs
Clone a git repository
The npm package git-clone receives a total of 109,800 weekly downloads. As such, git-clone popularity was classified as popular.
We found that git-clone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.