https://github.com/nrjdalal/gitpick
Clone exactly what you need aka straightforward project scaffolding!
https://github.com/nrjdalal/gitpick
clone degit directory file folder git github repository scaffolding template url
Last synced: 7 months ago
JSON representation
Clone exactly what you need aka straightforward project scaffolding!
- Host: GitHub
- URL: https://github.com/nrjdalal/gitpick
- Owner: nrjdalal
- License: mit
- Created: 2025-01-15T13:50:36.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-12T00:13:12.000Z (7 months ago)
- Last Synced: 2025-04-12T01:24:40.424Z (7 months ago)
- Topics: clone, degit, directory, file, folder, git, github, repository, scaffolding, template, url
- Language: TypeScript
- Homepage: https://npmjs.com/package/gitpick
- Size: 384 KB
- Stars: 18
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# GitPick
**Clone exactly what you need aka straightforward project scaffolding!**
📦 `Zero dependencies` / `Un/packed (<35/15kb)` / `Faster and more features` yet drop-in replacement for `degit`
[](https://twitter.com/nrjdalal_com)
[](https://www.npmjs.com/package/gitpick)
[](https://www.npmjs.com/package/gitpick)
[](https://github.com/nrjdalal/gitpick)

---
## ✨ Features
- 🔍 Clone individual files or folders from any GitHub repository
- ⚙️ Auto-detects branches and target directory (if not specified) like `git clone`
- 🧠 Use shorthands `TanStack/router` or full URL's `https://github.com/TanStack/router`
- 🗑️ Overwrite or replace existing files without a prompt using `-o` | `--overwrite`
- 📦 Can easily clone all submodules with `-r` | `--recursive`
- 🔁 Sync changes remotely with `--watch` using intervals (e.g., `15s`, `1m`, `1h`)
- 🔐 Seamlessly works with both public and private repositories using a PAT
---
## 🚀 Quick Usage
```sh
npx gitpick [target] [options]
```
- [target] and [options] are optional, if not specified, GitPick fallbacks to the default behavior of `git clone`
Examples:
```sh
npx gitpick https://github.com/TanStack/router # repo without .git
npx gitpick TanStack/router/tree/main/examples # a folder aka tree
npx gitpick TanStack/router/blob/main/README.md # a file aka blob
npx gitpick # default git behavior
npx gitpick [target] # with optional target
npx gitpick -b [branch/SHA] # branch or commit SHA
npx gitpick -o # overwrite if exists
npx gitpick -r # clone submodules
npx gitpick -w 30s # sync every 30 seconds
npx gitpick https://@github.com/owner/repo # private repository
```

---
## 🔧 Options
```
-b, --branch Branch/SHA to clone
-o, --overwrite Skip overwrite prompt
-r, --recursive Clone submodules
-w, --watch [time] Watch the repository and sync every [time]
(e.g. 1h, 30m, 15s)
-h, --help display help for command
-v, --version display the version number
```
---
## 🔐 Private Repos
Use a [GitHub personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#about-personal-access-tokens) (create one 👉 [here](https://github.com/settings/personal-access-tokens/new)) with `repo -> contents: read-only` permission:
```sh
npx gitpick https://@github.com/owner/repo
```
---
## 📦 Install Globally (Optional)
```sh
npm install -g gitpick
gitpick [target] [options]
```
---
## 🛠 More Tools
Check out more projects at [github.com/nrjdalal](https://github.com/nrjdalal)
## 📄 License
MIT – [LICENSE](LICENSE)