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 an addition to Related projects! #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nrjdalal
Copy link

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.


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 changed the title GitPick as addition to Related projects! GitPick as an addition to Related projects! Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant