How do people manage hundreds of Git repositories?
I have worked with several large companies using git as their version control system. One hosts several hundred git repositories in bitbucket stash, the other has around a hundred repositories in github.
We recently ran into an issue with joda-time where upgrading past java8u60 caused apps to fail on startup. So my team is tasked with getting all of our microservices working with the latest jdk.
What tools are there to modify and commit similar changes across 100+ repositories at once?
I have found gitwalk https://www.npmjs.com/package/gitwalk which does a subset of what I want focused on github. But google has not revealed many other tools that can do discovery and transformations across 100s of repositories.
(
15 comments
| 17 points
| on HN
)
Every step of the way you need to balance the effort of doing something with a script vs doing it manually.
How long would it take to manually make the change in all 100+ repos... vs. how long would it take to write a script to do it. Would the script be robust enough to properly make the change in like 90% of them... etc.
These are things you need to ask yourself in your endeavor.
You'd want to do all this work on a new similarly named branch (or branches depending on your workflow) for every repo.
Perhaps write a script to validate changes to all 100+ repos on that branch. Then when all the work is done... do a massive merge.
Another idea is if you can refactor the common bits into a shared standard library, for instance the design pattern is something like a system with a bunch of plugins, then most of the plugin repos become very tiny. Ideally you’d also have some sort of infrastructure automation around deployment.
In the general case, each organisation should have a single repo containing all of its code. There are times to violate this rule, but unless you're in extraordinary circumstances, more than a dozen repos in an organisation is an extremely bad mistake.
In general, a process which allows one person in an organisation to stymie another's progress is a broken system.
http://myrepos.branchable.com/
IIRC it has a good man page explaining more advanced use.