https://github.com/aichbauer/node-git-clone-repo
Clone a git repository
https://github.com/aichbauer/node-git-clone-repo
clone git is-git nodejs repository
Last synced: 4 months ago
JSON representation
Clone a git repository
- Host: GitHub
- URL: https://github.com/aichbauer/node-git-clone-repo
- Owner: aichbauer
- License: mit
- Created: 2017-09-17T23:11:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-09T13:04:29.000Z (about 7 years ago)
- Last Synced: 2025-03-04T20:40:52.062Z (4 months ago)
- Topics: clone, git, is-git, nodejs, repository
- Language: JavaScript
- Size: 41 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# git-clone-repo
> Clone a git repository
[](https://travis-ci.org/aichbauer/node-git-clone-repo)
[](https://ci.appveyor.com/project/aichbauer/node-git-clone-repo)
[](https://coveralls.io/github/aichbauer/node-git-clone-repo?branch=master)## Installation
```sh
$ npm i git-clone-repo --save
```or
```sh
$ yarn add git-clone-repo
```## Usage
```js
const gitCloneRepo = require('git-clone-repo'); // import gitCloneRepo from 'git-clone-repo'// clones the repo to your current working dir
gitCloneRepo('www.github.com/username/repo-that-exists'); // => true// clones the repo to your current working dir
gitCloneRepo('https://www.github.com/username/repo-that-exists'); // => true// clones the repo to your current working dir
gitCloneRepo('username/repo-that-exists', { host: 'bitbucket.com' }); // => true// clones the repo to your current working dir + 'your/destination/path'
gitCloneRepo('username/repo-that-exists', {
host: 'bitbucket.com',
destination: 'your/destination/path'
}); // => true// automatically checks github if no host is provided
gitCloneRepo('username/repo-that-not-exists'); // => false
```## LICENSE
MIT © Lukas Aichbauer