Skip to content

git

mdocker git reports a project’s git state. All calls are local (git -C <toplevel>) — no network access.

Print a snapshot of the project’s working tree.

mdocker git info
mdocker git info <name>
mdocker --json git info <name>

The snapshot includes: branch (or detached-HEAD state); dirty counts (staged, unstaged, untracked); ahead/behind vs. upstream; last commit; remote URL; stash count; and worktrees.

Behaviour Detail
Non-repo path Returns {is_repo: false} and exits 0.
Subdirectory of a repo Resolves to git rev-parse --show-toplevel.
Network None — ahead/behind is against the locally known upstream (no git fetch).

The macOS app’s Git card is built from the --json output.