Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitPick as addition to Related projects! #212

Open
nrjdalal opened this issue Feb 13, 2025 · 0 comments
Open

GitPick as addition to Related projects! #212

nrjdalal opened this issue Feb 13, 2025 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@nrjdalal
Copy link

nrjdalal commented Feb 13, 2025

Hey I just create a new tool and would love y'all to look at it, if it works for you, I would be happy to add on new features and improvements. Contributions welcome.

GitPick - With gitpick, you can clone precisely what you need.

If the tool is upto mark, let me know and I will create a pull request for addition onto Related projects!


GitPick

With gitpick, you can clone precisely what you need.

npm npm GitHub

Tired of cloning an entire repository when you only need a specific file or folder? Need to watch remote changes and sync them locally? GitPick is here to help!

Simply copy the Github URL and run with npx gitpick <url>, be that a public or a private repository.

  • Target is optional, and gitpick follows default git clone behavior. Read usage for more details.
Image

Usage

With gitpick, you can clone precisely what you need.

🚀 More awesome tools at https://github.com/nrjdalal

-------------------------------------
  gitpick <url> [target] [options]
-------------------------------------

Hint: Target is optional, and follows default git clone behavior.

Arguments:
  url                GitHub URL with path to file/folder
  target             Directory to clone into (optional)

Options:
  -b, --branch       Branch to clone
  -o, --overwrite    Skip overwrite prompt
  -w, --watch [time] Watch the repository and sync every [time]
                     (e.g. 1h, 30m, 15s) default: 1m
  -h, --help         display help for command
  -v, --version      display the version number

Examples:
  $ gitpick <url>
  $ gitpick <url> [target]
  $ gitpick <url> [target] -b [branch]
  $ gitpick <url> [target] -w [time]
  $ gitpick <url> [target] -b [branch] -w [time]

If you wish to clone a private repository, generate a personal access token.

  • For fine-grained access, select Repository permissions to be Contents: Read-Only.

  • Use https://<token>@github.com as URL prefix when cloning.

Checkout https://github.com/nrjdalal for more awesome repositories.

Installation

You can install GitPick globally using npm:

npm install -g gitpick

After installing, you can run the command:

gitpick <url> [target] [options]

Or use npx to run the command without installing:

npx gitpick <url> [target] [options]

Usage

Run npx gitpick <url> [target] [options] to clone a file or directory from a GitHub repository.


Say your files are located at following GitHub URL with a directory:

https://github.com/nrjdalal/nrjdalal/tree/main/.config

You can sync them to a target directory in your project using:

npx gitpick https://github.com/nrjdalal/nrjdalal/tree/main/.config config

This will clone the .config directory from the nrjdalal/nrjdalal repository to the config directory in your project. If no target directory is given, it will use the last segment of the URL, e.g., in this case, .config.


If you need to watch for changes, just add -w or -w [time] (e.g., 1s, 1m, 1h which is time in a human-readable format, default is 1m):

gitpick https://github.com/nrjdalal/nrjdalal/tree/main/.config -w

Additionally, you can use this tool to clone any file or directory from any repository. For example:

gitpick https://github.com/nrjdalal/awesome-templates/tree/main/next.js-apps/next.js-pro

The above command will clone the next.js-pro template from that particular repository.


I would love feedback from you all. Let's go!

License

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

URLs

https://github.com/nrjdalal/gitpick

@nrjdalal nrjdalal added the documentation Improvements or additions to documentation label Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant