A collection of scripts for working with a few or a large number of git repos at once. - f3rno64/mass-git-scripts
After an unexpected need to reset my work machine 😓, and needing to set up my development environment again by hand 🛠️, I decided to create a solution to quickly restore my local git repositories (and associated folder structure) 🔄.
I took this opportunity to write two bash scripts that clone and update all repositories on GitHub belonging to either a user or an organization 📦.
This means that, for example, with a single command ⌨️, you can clone hundreds or thousands of repositories, with high levels of concurrency (50 clones in parallel is doable 💨).
The scripts allow for a configurable clone depth, a limit for the number of repositories cloned, and a level of concurrency that decides how many clones are run in parallel 📈.
Bit of a protip if you're interested. If you wrap the scripts in a subshell (that is, ( and ) at the beginning and end) you don't need to unset the variables you exported.