Audit Git repositories for bloat, stale branches, and maintenance issues. Generate safe cleanup scripts.
python3 scripts/audit_repo.py /path/to/repo
# Stale branches only
python3 scripts/audit_repo.py /path/to/repo --check branches
# Large files in history
python3 scripts/audit_repo.py /path/to/repo --check large-files
# Full audit
python3 scripts/audit_repo.py /path/to/repo --check all
python3 scripts/audit_repo.py /path/to/repo --format text|json|markdown
--stale-days)--min-size)Use --fix to generate (not execute) cleanup scripts:
python3 scripts/audit_repo.py /path/to/repo --fix
# Outputs cleanup.sh with safe delete commands
The generated script uses git branch -d (safe delete, refuses if not merged) by default.
Use --force-delete to generate git branch -D commands instead.
共 1 个版本