nmbl Documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage
Edit page

gitstatus - Git Repository Status

Overview

The gitstatus command scans a directory tree for git repositories and reports their status without pulling or modifying any files. Repository statuses are fetched in parallel. The summary table reports staged, modified, untracked, and unpushed counts per repository. Repositories on feature branches are listed in a separate section even when they have no local changes.

Syntax

nmbl gitstatus [path] [options]

Arguments

  • path - Root directory to search for git repositories. Defaults to the current directory.

Options

  • --depth, -d <n> - Maximum directory search depth (1–10). Defaults to 5.
  • --include-org - When present, prepends an Organization column to both the local-changes table and the feature-branch table. The organization is extracted from the git remote URL (e.g., NimblePros from github.com/NimblePros/repo). Falls back to the parent folder name if no remote is configured or the URL cannot be parsed.

Output

Prints the root path and search depth, then discovers repositories and displays:

  1. A Summary table showing total repositories, clean count, repositories with local changes, and repositories on a feature branch.
  2. A Repositories with Local Changes detail table (if any) showing repository name, branch, staged, modified, untracked, and unpushed counts. When --include-org is used, an Organization column showing the GitHub organization/username (from the remote URL) is prepended to this table.
  3. An On Feature Branch with No Uncommitted or Unpushed Changes table (if any) showing repository name, current branch, and default branch.

Exit Codes

  • 0 - Success, including when no repositories are found.
  • 1 - The specified directory does not exist or an unexpected error occurs.

Examples

Check all repositories in a directory

nmbl gitstatus ~/projects

Shows status of all git repositories found under ~/projects.

Check the current directory

nmbl gitstatus

Searches the current directory and all subdirectories for git repositories.

Limit search depth

nmbl gitstatus ~/projects --depth 2

Only searches two directory levels deep when looking for repositories.

Group repositories by organization

nmbl gitstatus ~/projects --include-org

Adds an Organization column to each output table, showing the GitHub organization or username from the remote URL. Falls back to the parent folder name if no remote is configured. Useful when you have repositories from multiple organizations cloned in the same directory.

Check before updating

# First check status
nmbl gitstatus ~/projects

# Then update all repositories safely
nmbl gitupdate ~/projects

Use Cases

Team workspace management

nmbl gitstatus ~/company-projects

Check the status of all company repositories in one command.

End of day checklist

# Before leaving for the day, verify everything is committed
nmbl gitstatus ~/workspace

Any repository shown in the local changes table still has uncommitted work.

Verify CI checkout state

nmbl gitstatus /build/checkout

Confirm that the CI workspace has no unexpected modifications before a build.

  • gitupdate - Pull latest changes in multiple repositories
  • offlineprep - Prepare environment for offline work