Scanning a directory
To scan a directory for git repositories, use thedirty command followed by a path:
Understanding the output
Here’s an example of what the output looks like:Status indicators
Each repository is displayed with status indicators:*— Repository has uncommitted changes (displayed in red)[local]— Repository has no remotes configured (displayed in yellow)
The asterisk (
*) appears for any uncommitted or untracked changes, including modified files, staged changes, or new untracked files.Search depth
By default,dirty searches up to 3 levels deep from the specified directory:
The search stops when it finds a
.git folder. Nested repositories inside another repository are not scanned.Summary line
At the bottom of the output, you’ll see a summary line:- Total repositories found (8 repos)
- Repositories with uncommitted changes (4 dirty)
- Repositories without remotes (3 local-only)