GithubHelp home page GithubHelp logo

isurfer21 / clone-github-subdir Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13 KB

Clone any sub-directory of a Github repo to your local machine with this handy command-line tool

Home Page: https://crates.io/crates/clone-github-subdir

License: MIT License

Rust 100.00%

clone-github-subdir's Introduction

clone-github-subdir

Clone any sub-directory of a Github repository to your local machine with this handy command-line tool. It is useful if you only want to clone a specific part of a repo.

Installation

You can install clone-github-subdir from crates.io using cargo:

cargo install clone-github-subdir

Or you can build it from source using git:

git clone https://github.com/isurfer21/clone-github-subdir.git
cd clone-github-subdir
cargo build --release

Usage

To use clone-github-subdir, first check if all set via short command cgs along with --help or -h option, e.g.,

> cgs --help
Usage:
 cgs [options] <link>

Arguments:
 link              Github sub-directory URL

Options:
 -h, --help         Show this help message
 -v, --version      Show the program version
 -c, --curdir       Current sub-directory only

You can also use the following options:

  • -h, --help: Show the help message and exit.
  • -v, --version: Show the program version and exit.
  • -c, --curdir: Clone only the current sub-directory, not its parent directory.

Now to clone the GitHub sub-directory, you can provide any GitHub repository's sub-directory URL as an argument, e.g.,

cgs https://github.com/second-state/wasm-learning/tree/master/nodejs/hello

This will clone the nodejs/hello sub-directory of the second-state/wasm-learning repo to your current working directory.

Alternatively, to clone only the target sub-directory, you can use --curdir or -c option , e.g.,

cgs -c https://github.com/second-state/wasm-learning/tree/master/nodejs/hello

This will clone only the hello sub-directory, not its parent directory like nodejs/hello.

License

This project is licensed under the MIT license. See the LICENSE file for more details.

clone-github-subdir's People

Contributors

isurfer21 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.