Socket
Book a DemoInstallSign in
Socket

gh-clone

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-clone

git clone a repo with only username/repo.

Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
99
65%
Maintainers
2
Weekly downloads
 
Created
Source

gh-clone NPM version Build Status

git clone a repo with only username/repo.

Install

Install globally with npm

$ npm i -g gh-clone

Usage

Let's say you want to clone micromatch:

$ gh-clone [owner/repo] <commands>

Examples

owner/repo

You can pass github owner name/repo:

$ gh-clone jonschlinkert/micromatch

repo

If you pass the repository name only, gh-clone will resolve the git url from the package.json hosted on npm.

$ gh-clone micromatch

flags

  • -r|--repo: the repository to clone
  • -b|--branch: the branch to clone
  • -d|--dest: the local destination

Example: 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

Example: destination

If you want to save to the foo directory

$ gh-clone jonschlinker/micromatch -d foo

Example: branch and destination

If you want to save the dev branch to the foo directory

$ gh-clone jonschlinker/micromatch -b dev -d foo

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.

This file was generated by verb-cli on November 22, 2015.

Keywords

clone

FAQs

Package last updated on 22 Nov 2015

Did you know?

Socket

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.

Install

Related posts