- I like mani. It's a cli that lets you run any command on all of your projects or a tagged subset of them.
$ mani exec --all --output table --parallel 'find . -type f | wc -l'
Project | Output
--------------------+--------
example | 31016
pinto | 14444
dashgrid | 16527
template-generator | 42
The custom commands you define also have shell completions. It's like a just command runner, but for all of your projects.https://github.com/alajmo/mani
by chrismorgan
1 subcomments
- > ⬆ - Ahead of remote
> ⬆⬆ - Diverged from remote
This is an obscure and confusing way of representing it. At the very least, I’d expect the addition of ⬇ to mean behind remote, and then ⬇⬆ to mean diverged (since it is logically just “both behind and ahead”).
For my part, I prefer a notation like “-4+5” to mean “4 commits behind, 5 commits ahead”, produced in this way in my $RPROMPT:
commits_behind=$(git log --oneline ..@{u} 2> /dev/null | wc -l || echo 0)
commits_ahead=$(git log --oneline @{u}.. 2> /dev/null | wc -l || echo 0)
if [ $commits_behind -gt 0 -o $commits_ahead -gt 0 ]; then
echo -n " %{\x1b[33m%}"
[ $commits_behind -gt 0 ] && echo -n -$commits_behind
[ $commits_ahead -gt 0 ] && echo -n +$commits_ahead
fi
- Reminds me of myrepos, there are a lot of projects like this.
https://myrepos.branchable.com/
https://myrepos.branchable.com/related/
by weinzierl
2 subcomments
- 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.
by postoplust
1 subcomments
- Also see https://github.com/fboender/multi-git-status which I've used happily for a few years.
It's a shell script (#!sh) and therefore easy as copy/paste to install.
by gerardnico
0 subcomment
- Nice.
I made a git exec command for that. It executes a command on multiple repos.
So to see the status of your local repositories cloned in the code directory of your home directory
´´´bash
export GIT_X_REPOS_FILE=~/code
git exec status
´´´
Code:
https://github.com/gerardnico/git-x/blob/main/bin/git-exec
Doc:
https://github.com/gerardnico/git-x/blob/main/docs/bin-gener...
- "mr status" command gives status information of locally checked out repos. Refer https://myrepos.branchable.com/
- If you're into multi-repo setups then you might be interested in garden. I built this specifically for handling dozens of repos as single units.
https://github.com/garden-rs/garden
by chrisdugne
0 subcomment
- A fast, cross-platform CLI tool to check the git status of multiple projects organized by categories.
Run check-projects to see which of your projects have uncommitted changes, are ahead of remote, or have other git status indicators.
by r0ze-at-hn
0 subcomment
- My own my generic and more powerful git-map lets you run any git command on all repos at the same directory level. Simply putting the shell script in your path and then $git map status or $git map fetch etc
https://github.com/r0ze-at-github/git-map
- Been a while since I've used it, but I remember using a tool for this, gita [1], you could also just pass through commands to each repo.
[1]: https://github.com/nosarthur/gita/
- Reminds me of a little tool I built to figure out if I can safely delete repos when upgrading/moving machines: https://gitlab.com/leipert-projects/git-recon
- I'm using Google's `repo` for multi-repo project at work.
https://gerrit.googlesource.com/git-repo
by alain_gilbert
0 subcomment
- reminds me of an project I made many years ago to manage dependencies in between repositories. So if project A was waiting for a fix in project B to be in production, you could draw a line between the two commits (from project A to project B) and get notified when the commit in project B gets into the "production" branch. And then merge and deploy your feature branch from project A.
- Cool, I wrote a similar tool but that let's users define their own tasks (comes with a tui as well) github.com/alajmo/mani.
ls | xargs -I % sh -c 'cd %; pwd; git status -s'
by funkattack
0 subcomment
- I mean, i love those kind of cli tools but in my current mood, instead looking for it on github, I'd probably ask an frontier model:
“Create a cross-platform CLI tool that scans multiple Git projects (grouped by category) and reports their status (clean, modified, ahead, error) based on a YAML config.”
Allways surprised how far this gets me. Most of my dotfiles now got created this way.
- things people do instead of having a monorepo
- Cool, I just had claude code write me something similiar this week to go through my immediate directories and get me this type of information on each one of this (since all of my git repos are under a single dir)