MGITSTATUS(1)

πŸ“¦
version 2.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MGITSTATUS(1) πŸ’–

okay so bestie, welcome to the mgitstatus manual page, section 1 of the manual. this is the one that tells you if ur git repos are a mess. let's get into it 🫢


✨ NAME ✨

mgitstatus β€” show uncommitted, untracked and unpushed changes for multiple Git repos.

like. all of them. at once. no more cd-ing into 47 folders like a Victorian orphan. πŸ‘‘


🌈 SYNOPSIS 🌈

mgitstatus [--version] [-w] [-e] [-f] [--throttle SEC] [-c]
[-d/--depth=2] [--flatten] [--no-X] [DIR [DIR]...]

πŸ’… DESCRIPTION πŸ’…

mgitstatus shows you the uncommitted, untracked and unpushed changes lurking in multiple Git repositories. by default it scans two directories deep β€” and yes, you can change that with the -d (--depth) option. and if DEPTH is 0? the scan is infinitely deep. like, it will go down forever. main character energy tbh.

so here's the whole vibe check of what mgitstatus will show you:

  • Uncommitted changes β€” if there are unstaged or uncommitted changes on the checked out branch. the classic "oops I forgot to commit" situation 😭
  • Untracked files β€” if there are untracked files which are not ignored.
  • Needs push (BRANCH) β€” if the branch is tracking a (remote) branch which is behind. ur work is sitting at home, not at the party.
  • Needs upstream (BRANCH) β€” if a branch does not have a local or remote upstream branch configured. and like, that's a problem bestie, because changes in the branch may otherwise never be pushed or merged. πŸ’€
  • Needs pull (BRANCH) β€” if the branch is tracking a (remote) branch which is ahead. this one requires that the local git repo already knows about the remote changes (i.e. you've done a fetch), or that you specify the -f option. mgitstatus does NOT contact the remote by default. it's not gonna go knocking on ur remote's door uninvited, ok?
  • X stashes β€” if there are stashes. X is the number, girlies.
fr fr, since there are a lot of different states a git repository can be in, mgitstatus makes no guarantees that all states are taken into account. it's doing its best. πŸ™ˆ

✨ OPTIONS ✨

  • --version β€” Show version. that's it. that's the tweet.
  • -w β€” Warn about dirs that are not Git repositories. snitch on the non-repos. πŸ“’
  • -e β€” Exclude repos that are ok. if it's fine, we don't need to hear about it.
  • -f β€” Do a git fetch on each repo. heads up: this is slow for many repos. like, go make a snack slow. πŸ“
  • --throttle SEC β€” Wait SEC seconds between each git fetch (the -f option). for when you're being polite to ur remotes.
  • -c β€” Force color output (preserve colors when using pipes). because piping shouldn't strip ur aesthetic. πŸ’…
  • -d, --depth=2 β€” Scan this many directories deep. Default is 2. If 0, the scan is infinitely deep. yes. infinite. we said what we said. πŸŒ€
  • --no-depth β€” Do not recurse into directories (incompatible with -d). they cannot coexist, they are enemies, do not put them in the same room. πŸ’€
  • --flatten β€” Flatten output by only showing one status per line. If a repo has multiple statuses, multiple lines are shown for that repo. This aids in grepability. grep girlies, this one's for you 🧚

and now, the limiter options. you can limit output with the following:

  • --no-push β€” Do not show branches that need a push.
  • --no-pull β€” Do not show branches that need a pull.
  • --no-upstream β€” Do not show branches that need an upstream.
  • --no-uncommitted β€” Do not show branches that have unstaged or uncommitted changes.
  • --no-untracked β€” Do not show branches that have untracked files.
  • --no-stashes β€” Do not show stashes. (the original says "Do now show stashes" which is a typo but we all knew what it meant πŸ’–)
  • --no-ok β€” Do not show repos that are ok (same as -e). (also a typo in the source, also understood. we love them anyway.)

🌸 EXAMPLES 🌸

here's the part where we actually do stuff. slay.

The following command scans two directories deep for Git projects and shows their status:

$ mgitstatus
./fboender/sla: ok
./fboender/multi-git-status: Needs push (master) Untracked files
./other/peewee: ok

To scan deeper (three dirs instead of two) in the current dir:

$ mgitstatus -d 3

The following command scans three levels deep in /opt/deploy/ and hides repos that are ok. It does not show stashes:

$ mgitstatus -e --no-stashes -d 3 /opt/deploy

To ignore a repo, set the mgitstatus.ignore git configuration option for that repo to true. E.g.:

$ cd stupidrepo
$ git config --local mgitstatus.ignore true

Sort output by repo name while retaining colors:

$ mgitstatus -c | sort
./ansible: ok
./ansible-cmdb: Needs push (master) Uncommitted changes Untracked files
./davis: ok
./espy: Uncommitted changes Untracked files
./garner: Untracked files
./garner-chains: ok
./mdpreview: ok

Sort output by repo status while retaining colors:

$ mgitstatus -c --flatten -e | sort -k2
./fboender/ansible-cmdb: Uncommitted changes
./fboender/espy: Uncommitted changes
./fboender/multi-git-status: Uncommitted changes
./fboender/ansible-cmdb: Needs push (master)
./fboender/ansible-cmdb: Untracked files
./fboender/espy: Untracked files
./fboender/garner: Untracked files
./fboender/multi-git-status: Untracked files

Force color output and flatten the output so we can grep for things:

$ mgitstatus --flatten -c | grep Uncommitted
./fboender/multi-git-status: Uncommitted changes
./fboender/ansible-cmdb: Uncommitted changes
./fboender/espy: Uncommitted changes

Copyright 2016-2022, Ferry Boender (et al).

Licensed under the MIT license. For more information, see the LICENSE.txt file.


πŸ’œ AUTHORS πŸ’œ

Ferry Boender.


and that's the whole page, bestie πŸŽ€ this was the MGITSTATUS(1) manual, dated Mar 2022, and yeah the footer says MGITSTATUS(1) again because manpages are like that β€” they say hello twice. mwah. πŸ’‹

πŸ“¦ where this page comes from