Fetch or pull one or more git repositories at a specified location on your system.
If you want to use the script as is, you can download the script and run it directly:
git clone https://github.com/StrangeRanger/mass-git
cd mass-git
./mass-git
If you want the script accessible outside of the directory you downloaded it to, you can run the setup script. It will place a symbolic or hard link (configurable via the script) in your local bin directory (~/.local/bin
).
git clone https://github.com/StrangeRanger/mass-git
cd mass-git
./setup.bash
❯ ./mass-git -h
Fetch or pull one or more git repositories at a specified location on your
system.
Usage: mass-git [-r] [-f] [-d] <path>
mass-git -h
mass-git -v
Options:
-h, --help : Displays this help message.
-r, --recursive : Recursively locate git repositories.
-f, --fetch : Fetch instead of pull from git repository.
-d, --dry-run : Show what would be done, without making any changes.
-v, --version : Display program version number.
Here is an example output:
❯ ./mass-git.sh -r ~/Programs/tmp
==> Changing directories to '/Users/hunter/Programs/tmp/FINISH THESE/mass-git/'...
==> Pulling from 'https://github.com/StrangeRanger/mass-git.git'...
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (3/3), 1.53 KiB | 522.00 KiB/s, done.
From https://github.com/StrangeRanger/mass-git
099e202..b50b4e2 dev -> origin/dev
099e202..b50b4e2 master -> origin/master
Updating 099e202..b50b4e2
Fast-forward
mass-git.sh | 41 +++++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 12 deletions(-)
==> Changing directories to '/Users/hunter/Programs/tmp/FINISH THESE/dynamic motd/'...
==> Pulling from 'https://github.com/StrangeRanger/dynamic-motd'...
Already up to date.
==> Changing directories to '/Users/hunter/Programs/tmp/formatters/prettier/'...
==> Pulling from 'https://gist.github.com/StrangeRanger/89a2a1c3982ed4ac392d9425463ba4e8'...
Already up to date.
==> Changing directories to '/Users/hunter/Programs/tmp/programming terminology/'...
==> Pulling from 'https://github.com/StrangeRanger/programming-terminology'...
remote: Repository not found.
fatal: repository 'https://github.com/StrangeRanger/programming-terminology/' not found
ERROR: Failed to pull from 'https://github.com/StrangeRanger/programming-terminology'
==> Changing directories to '/Users/hunter/Programs/tmp/string permutation/'...
==> Pulling from 'https://github.com/StrangeRanger/string-permutation'...
Already up to date.
==> Changing directories to '/Users/hunter/Programs/tmp/continue working on/NadekoBot-BashScript/'...
==> Pulling from 'https://github.com/StrangeRanger/NadekoBot-BashScript'...
Already up to date.
==> Done
This program should work on all unix and unix-like operating systems that have bash installed.