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

gitupdate - Update Git Repositories

Overview

The gitupdate command safely pulls the latest changes for every git repository found under a root directory. Repositories are updated in parallel. Any repository that has uncommitted changes, unpushed commits, or no identifiable default branch is skipped automatically — it is never modified. Live progress is written to the console as each repository completes, followed by a summary table.

Syntax

nmbl gitupdate [path] [options]

Arguments

  • path - Root directory containing git repositories to update. Defaults to the current directory.

Options

  • --threads, -t <n> - Number of parallel workers (1–20). Defaults to the service default.
  • --depth, -d <n> - Maximum directory search depth (1–10). Defaults to the service default.

Output

Prints the root path, search depth, and parallel worker count. As each repository completes, a status line is written:

  • Pulled successfully → ↓ <repo> updated
  • Already current → ✓ <repo> up to date
  • Skipped due to uncommitted changes → ⚠ <repo> skipped (uncommitted)
  • Skipped due to unpushed commits → ⚠ <repo> skipped (unpushed)
  • Skipped — no default branch found → ⚠ <repo> skipped (no default branch)
  • Error → ✗ <repo> error: <message>

After all repositories finish, a Summary table shows totals for Updated, Already up to date, Skipped (safe), and Errors. If any repositories were skipped due to local changes, a detail table lists them.

Exit Codes

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

Examples

Update all repositories in a directory

nmbl gitupdate ~/projects

Finds and updates all git repositories under ~/projects.

Update the current directory tree

nmbl gitupdate

Updates all repositories starting from the current directory.

Limit parallelism

nmbl gitupdate ~/projects --threads 4

Uses at most 4 parallel workers instead of the default.

Limit search depth

nmbl gitupdate ~/projects --depth 2

Only searches two directory levels deep when looking for repositories.

Morning update routine

nmbl gitupdate ~/workspace

Start your day by pulling all repositories in one operation.

Use Cases

Microservices development

# Update all microservices at once
nmbl gitupdate ~/services

# Then check their status
nmbl gitstatus ~/services

Preparing for offline work

# Update all repositories before disconnecting from the network
nmbl gitupdate ~/workspace

See also offlineprep for a combined git-update and NuGet-source preparation command.

How safe skipping works

The command never forces a pull. A repository is skipped (without error) when:

  • It has staged or unstaged changes that have not been committed.
  • It has local commits that have not been pushed to the remote.
  • No default branch (main or master) can be identified.

Skipped repositories are counted separately in the summary so you can review them after the run.

  • gitstatus - Check status of git repositories without modifying them
  • offlineprep - Prepare development environment for offline work