# script: git-status-report **Location:** `~/dev/claude/small-scripts/scripts/git-status-report` **Symlinked to:** `~/sbin/git-status-report` **Source project:** small-scripts (not claude-foundations) ## Purpose Recursively scans a directory for git repos and reports uncommitted changes and remote sync status. Used by `context-load` to include git status in the system prompt. ## Usage ```bash git-status-report [OPTIONS] [DIRECTORY] ``` - `-n, --dryrun` — List discovered repos without running status checks - Default directory: cwd ## How it works 1. **Discovery:** Finds all `.git` directories, filters out nested repos 2. **Status:** For each repo, runs `git status --porcelain` and checks remote tracking branches 3. **Character diff:** Reports approximate character-level additions/removals per file (not just line counts) 4. **Report:** Prints dirty repos with colour-coded status, clean repo count at the end ## Gotchas - Does not `git fetch` — reports against local tracking refs only (speed over accuracy) - Exit code 1 if any repo is dirty (useful for CI/scripting) - ANSI colour output — `context-load` strips it via `strip_ansi` when embedding in system prompts