Use git-global
to keep track of all your local git repositories.
This is a Rust program that you can put on your PATH
with cargo install
git-global
, gaining an extra git subcommand that you can run from anywhere. To
obtain cargo and Rust, see https://rustup.rs.
Use git global <subcommand>
to:
git global [status]
: show git status
for all your git repos (the default
subcommand)git global info
: show information about git-global itself (configuration,
number of known repos, etc.)git global list
: show all git repos git-global knows aboutgit global scan
: search for git repos and update cacheTo change the behavior of git-global
, you can do so with --- wait for it
--- git global configuration!
To set the base path for search to something other than your home directory:
git config --global global.basedir /some/path
To add patterns to exclude while walking directories:
git config --global global.ignore .cargo,.vim,Library
git global unstaged
: show all repos that have unstaged changesgit global staged
: show all repos that have staged changesgit global stashed
: show all repos that have stashed changesgit global dirty
: show all repos that have changes of any kindgit global branched
: show all repos not on master
(TODO: or a different
default branch that is defined... somewhere?)git global duplicates
: show repos that are checked out to multiple placesgit global remotes
: show all remotes (TODO: why? maybe filter by hostname?)
git global add <path>
: add a git repo to the list that would not be found in a scan
git global ignore <path>
: ignore a git repo and remove it from the listgit global ignored
: show which git repos are currently being ignoredgit global monitor
: launch a daemon to watch git dirs with inotifygit global pull
: pull down changes from default tracking branch for clean repos
stream results as the come in (from git global status
, for example, so we don't
have to wait until they're all collected)
locate .git
if the DB is populated, instead of walking everythingSubcommand
trait