4 ms·
For working with many repos beyond pure status reporting there is Joey Hess's mr tool. My only gripe is that configuration is manual and I wish there was an e
by weinzierl 11mo ago
For working with many repos beyond pure status reporting there is Joey Hess's mr tool.
My only gripe is that configuration is manual and I wish there was an easy way fetch a set of repos from the well known forges into an mr config.
Oh, and I never figured out how to best work with it in a multi worktree per bare repo setup.
- pabs3 11mo agoAFAIK mr does not need much config, mostly just running `mr register` after `git clone`. When you do need to set config, the `mr config` command can help. All that said, I do have a lot of custom config :) There is a `mr bootstrap` command for pulling a repo with a .mrconfig file in it, and then pulling a bunch of repos from there, here is an example usage: https://wiki.debian.org/DebianInstaller/CheckOut https://wiki.debian.org/DebianInstaller/CheckOut mr does have bare repo support, I haven't tried git multi-worktree stuff before though. I guess you would have to manually register each worktree.
- weinzierl 11mo agoI guess what I want is a tool (not necessarily mr) that I point to a GitHub/Bitbucket/Gitlab project and it creates/updates the .mrconfig with all repos from the project.
- pabs3 11mo agoI guess I would generate mr config commands using the output of gh/glab repo list and run them in shell: gh repo list --json url,name -q '.[] | "mr --config .mrconfig config " + .name + " " + .url' | sh You could probably do it with xargs or similar too.
- pabs3 11mo agoIt might be worth including such a tool into mr itself, by wrapping the official CLI tools gh/glab/etc. You could access it via `mr bootstrap github:@foo` perhaps.
- igortg 11mo agoJust for completeness, there's also mu-repo: https://fabioz.github.io/mu-repo/ https://fabioz.github.io/mu-repo/ We've being using it for years. Very simple to setup.
- stevekemp 11mo agoI wrote a wee helper to export all the repositories of your profile/organization into an MR configuration file: https://github.com/skx/github2mr https://github.com/skx/github2mr But to be honest given the regular naming you might as well have a simple perl/ruby script to just read a list of names from STDIN and output the local directory-path, and remote.