DEV Community

João Vitor
João Vitor

Posted on • Edited on

4

Update git repos in parallel

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

If you do that synchronously it would have taken near 4 minutes.

real    4m53,583s
user    0m6,480s
sys     0m4,776s
Enter fullscreen mode Exit fullscreen mode

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more