Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kojix2/multipull
Git pull multiple repositories at once
https://github.com/kojix2/multipull
Last synced: 22 days ago
JSON representation
Git pull multiple repositories at once
- Host: GitHub
- URL: https://github.com/kojix2/multipull
- Owner: kojix2
- License: mit
- Created: 2022-06-01T12:29:22.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-01T00:52:13.000Z (over 2 years ago)
- Last Synced: 2024-09-14T04:41:40.729Z (about 2 months ago)
- Language: Ruby
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# multipull
[![Gem Version](https://badge.fury.io/rb/multipull.svg)](https://badge.fury.io/rb/multipull)
Ruby implementation of [multipull](https://dev.to/rmpato/git-pull-multiple-repositories-at-once-4l68).
## Installation
```sh
gem install multipull
```## Usage
```sh
multipull
``````sh
multipull ~/Ruby # directory
```## What is this?
The name of the command multipull was borrowed from the following article.
[Git pull multiple repositories at once](https://dev.to/rmpato/git-pull-multiple-repositories-at-once-4l68) by [@rmpato](https://github.com/rmpato)
```sh
alias multipull="find . -mindepth 1 -maxdepth 1 -type d -print -exec git -C {} pull \;"
```The following pages include some great one-liners.
[Run git pull over all subdirectories](https://stackoverflow.com/questions/3497123/run-git-pull-over-all-subdirectories#12495234).
```sh
find . -type d -depth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
``````sh
ls | xargs -I{} git -C {} pull
ls | xargs -P10 -I{} git -C {} pull
``````sh
git config --global alias.all '!f() { ls -R -d */.git | xargs -I{} bash -c "echo {} && git -C {}/../ $1"; }; f'
``````sh
for i in */.git; do ( echo $i; cd $i/..; git pull; ); done
```While these one-liners are nice, this multipull gem is better in the following ways
1. No need to remember one-liners. `gem install multipull` is easier than writing alias in bashrc.
2. No need to modify scripts for each OS.
3. Options can be added as needed.## Development
PR welcome.
If you would like to become an owner and take over the development, please contact me with a pull request.
## LICENSE
MIT