Skip to content

mathiasdonoso/git-pull

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-pull

Fast-forward every Git repository in a directory, in parallel, skipping anything that isn't safe to update.

Install

go install github.com/mathiasdonoso/git-pull/cmd/gp@latest

Usage

gp [directory]

Scans the immediate subdirectories of directory (default: .) and, for each one that is a Git repository, runs git pull --ff-only. Repositories are processed concurrently, with spawning rate-limited to ~250 requests/minute to stay under host SSH rate limits.

A repository is left untouched when it has local changes, an http/https remote (would prompt for credentials), or no fast-forwardable upstream.

Output

One line per repository with its result:

State Meaning
updated Fast-forwarded to the upstream.
skipped (dirty) Has uncommitted changes.
skipped (http remote) origin is http/https; skipped to avoid a credential prompt. Use SSH for these.
pull failed git pull --ff-only failed (e.g. diverged history).
rate limited Pull was throttled by the host.
error Could not read the repository status.

Debug

DEBUG=1 gp

About

A small CLI tool to safely run git pull across multiple local Git repositories, skipping those with local modifications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages