Basic usage
Scan a directory
To scan a directory for git repositories, run Dirty with a path:By default, Dirty searches up to 3 levels deep for git repositories.
Review the results
Dirty will display a list of all repositories found, with visual indicators for their status:
The scan runs in parallel using all available CPU cores, making it extremely fast even with hundreds of repositories.
Understand the output
Each line represents one git repository, with optional markers:
*(red) — Repository has uncommitted or untracked changes[local](yellow) — Repository has no remote configured- No marker — Repository is clean and has a remote
- Total number of repositories found
- Number of repos with uncommitted changes
- Number of repos without remotes
Common use cases
Scan with custom depth
Control how deep Dirty searches for repositories:Show only dirty repos
Filter to see only repositories with uncommitted changes:Show only local-only repos
Find repositories that don’t have a remote configured:Check for unpushed commits
See which repositories have commits ahead of their upstream branch:[↑n] indicator showing how many commits are ahead:
Combine filters and output raw paths
You can combine multiple flags for advanced workflows:-r) prints one path per line with no decorations, perfect for piping to other commands:
Example workflow
Here’s a typical workflow using Dirty:Next steps
For detailed information about all available options and flags, check out these guides:Basic Usage
Learn the fundamentals of scanning directories
Filtering
Filter results to show only dirty or local repos
Command Reference
Complete reference for all flags and options
Scripting Guide
Use Dirty in your automation scripts