
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
git clone a repo with only username/repo, or if it's an NPM package you can use just the name of the project.
git clone a repo with only username/repo, or if it's an NPM package you can use just the name of the project.
Follow this project's author, Jon Schlinkert, for updates on this project and others.
Install globally with npm
$ npm install --global gh-clone
Clone a github repository:
$ gh-clone <repo> [options]
repo - one or more space-separated repository namesoptions options flags to pass to gh-clonerepository name
If the repository is a NPM package, you can pass the name only, and gh-clone will resolve the git URL from the library's package.json:
$ gh-clone isobject
owner/repo
Pass the github repository formatted as owner/repo:
$ gh-clone jonschlinkert/isobject
| Shortcut | Flag | Description |
|---|---|---|
-c | --cwd | the current working directory (defaults to process.cwd()) |
-d | --dest | the local destination directory to clone the repository to |
-b | --branch | the branch to clone |
Note that if the --dest flag is used when cloning multiple repositories, the name of each repository will be appended to the dest value.
branch
Flags can be used in any order. If you want the dev branch of micromatch (when one exists):
$ gh-clone jonschlinker/micromatch -b dev
destination
If you want to save to the foo directory
$ gh-clone jonschlinker/micromatch -d foo
branch and destination
If you want to save the dev branch to the foo directory
$ gh-clone jonschlinker/micromatch -b dev -d foo
Clone one or more repositories with the given options.
Params
repos {String|Array}options {Object}callback {Function}: Optional, returns a promise if the callback is not passed.returns {Promise}: if a callback is not passed.Example
var clone = require('gh-clone');
clone('kind-of', function(err) {
if (err) console.error(err);
});
// or
clone(['isobject', 'kind-of'])
.then(function() {
// do stuff
})
.catch(console.error)
Called by the main export when a callback is not passed.
Params
repos {String|Array}options {Object}returns {Promise}Example
clone.promise(['isobject', 'kind-of'])
.then(function() {
// do stuff
})
.catch(console.error)
You might also be interested in these projects:
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
|---|---|
| 23 | jonschlinkert |
| 12 | doowb |
| 1 | johnotander |
| 1 | theuves |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on September 13, 2017.
FAQs
git clone a repo with only username/repo, or if it's an NPM package you can use just the name of the project.
The npm package gh-clone receives a total of 96 weekly downloads. As such, gh-clone popularity was classified as not popular.
We found that gh-clone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.