João Vitor
Posted on October 29, 2020
Are you living in a microservices world?
Do you need to keep multiple git repositories in sync?
How much time would it take to update 63 repositories?
The update-repos.sh
script uses gnu-parallel and execute the git pull --rebase
and git fetch --prune
in parallel.
Update repositories in parallel
cd ~/github-orgs/PacktPublishing
time update-repos.sh
Output:
[truncated]
job 56 completed ./Develop-and-Operate-Microservices-on-Kubernetes
Already up to date.
job 55 completed ./DevOps-Puppet-Docker-and-Kubernetes
Already up to date.
job 62 completed ./-Kubernetes-for-Absolute-Beginners---Hands-on
[truncated]
real 0m9,083s
user 0m6,321s
sys 0m2,668s
If you do that synchronously it would have taken near 4 minutes.
real 4m53,583s
user 0m6,480s
sys 0m4,776s
💖 💪 🙅 🚩
João Vitor
Posted on October 29, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.