# git-clone

> Clone a git repository

Latest version **0.2.0** (published 2021-09-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install git-clone
pnpm add git-clone
yarn add git-clone
bun add git-clone
```

## Health

**Score 13/100 (F)** — status: abandoned.

Positive: has types package; high quality score.

Warnings: low downloads; no esm support; has vulnerabilities; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2021-09-28 |
| First published | 2014-06-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/git-clone) |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 1 |
| Install scripts | no |
| GitHub stars | 67 |
| Author | Jason Frame |
| Maintainers | jaz303 |
| Keywords | git, clone, shell |

## Links

- npm: https://www.npmjs.com/package/git-clone
- Repository: https://github.com/jaz303/git-clone
- Issues: https://github.com/jaz303/git-clone/issues
- npm.io page: https://npm.io/package/git-clone

## Recent versions

- 0.2.0 (latest) — 2021-09-28
- 0.1.0 — 2015-03-01
- 0.0.4 — 2014-06-18
- 0.0.3 — 2014-06-10
- 0.0.2 — 2014-06-10
- 0.0.1 — 2014-06-10

## README

# git-clone

Clone a git repository via `git` shell command.

## Installation

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');

## API

## Common Options

  * `git`: path to `git` binary; default: `git` (expected to be in your `$PATH`)
  * `shallow`: when `true`, clone with depth 1
  * `checkout`: revision/branch/tag to check out after clone
  * `args`: additional array of arguments to pass to `git clone`

## Callback

#### `clone(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.

## Promise

#### `async clone(repo, targetPath, [options])`

Clone `repo` to `targetPath`, throwing an exception on failure.

## Contributors

  - [AntiMoron](https://github.com/AntiMoron)

## Copyright &amp; License

&copy; 2014-2021 Jason Frame &amp; Contributors [ [@jaz303](http://twitter.com/jaz303) / [jason@onehackoranother.com](mailto:jason@onehackoranother.com) ]

Released under the ISC license.

---
_Source: https://npm.io/package/git-clone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
