@huhuhang/multipull
v0.1.5
Published
Pull many Git repositories safely from one CLI.
Maintainers
Readme
multipull
Pull many Git repositories safely from one CLI.
multipull scans a directory tree for real Git repositories, skips noisy generated folders, and runs a conservative pull operation for each repository.
Features
- Discovers repository roots before running Git commands.
- Skips common heavy directories such as
node_modules,dist,build,target,vendor,lab-*, andchallenge-*. - Uses a safe pull strategy:
git pull --ff-only --prune. - Skips dirty worktrees by default.
- Skips detached HEAD and branches without an upstream.
- Shows a minimal single-line progress indicator in interactive terminals.
- Shows one clear final table with repository, branch, upstream, and result.
- Optionally parks dirty work on a
multipull-backup/*branch before switching to the default branch.
Installation
npm install -g @huhuhang/multipullDevelopment checkout:
git clone https://github.com/huhuhang/multipull.git
cd multipull
npm install
npm run build
npm linkUsage
multipull [paths...]Examples:
multipull
multipull ~/GitHub
multipull ~/GitHub ~/Work
multipull --dry-run
multipull --max-depth 5 ~/GitHub
multipull --verbose
multipull --park-to-default-branchOptions
--dry-run Show planned actions without pulling.
--max-depth <depth> Maximum directory depth to scan. Defaults to 3; use 0 for no limit.
--verbose Show Git output details after the summary table.
--park-to-default-branch Preserve dirty changes before switching to the default branch.Concurrency, timeout, and ignore rules are internal defaults so the command stays easy to use.
Default Behavior
For each discovered repository, multipull:
- Reads the current branch, upstream, and worktree status.
- Skips dirty worktrees unless
--park-to-default-branchis enabled and a default branch switch is needed. - Skips detached HEAD.
- Skips branches without an upstream.
- Runs
git pull --ff-only --prune. - Prints a final summary table.
Parking Local Work
--park-to-default-branch is explicit because it creates Git history and switches branches.
When enabled:
- If the repository is already on its default branch,
multipullpulls normally. - If the repository is on another clean branch,
multipullswitches to the default branch and pulls. - If the repository is on another dirty branch,
multipullcreates amultipull-backup/*branch, commits the current worktree there, switches to the default branch, and pulls.
Ignored files are not force-added or deleted.
Development
npm install
npm run typecheck
npm test
npm run build
npm run checkRun from source:
npm run dev -- ~/GitHub --dry-runLicense
MIT
