Inspect git repositories and report best practices violations.
The different reports are generated by python modules in git_inspector/reports
.
So far the following reports are generated:
dirty.py
reports repositories with a dirty working directorymerged.py
reports branches, that are merged into the master branch and can be safely deletedunpushed.py
reports branches, that contain un-pushed commitsuntrached_branches.py
reports branches, that have no upstreamlocal.py
reports local only repositoriesbroken_remote.py
reports local remotes of which the remote directory does not existuntracked.py
reports branches, that are not tracked by a remote branch
python -m pip install git+https://github.com/yaniksoeltzer/git_inspector
usage: git_inspector [-h] [-l level] [path ...]
You can use git_inspector
and git-inspector
in like manner.
For help about the usage run git-inspector --help
.
Provide one or multiple relative or absolute paths
to the Git-Inspector.
# Inspect the home directory of the current user
git_inspector ~
# Inspect current directory
git_inspector .
# Inspect multiple directories
git_inspector ~/my_projects /opt/projects
The Git-Inspector allows to set the report level, showing only reports with the provided report-level or
a higher report-level. The report-level can be set to alert
, warning
, or hint
using the --report-level
/ -l
parameter.
The default value is warning
.
To also show hints run
# Show everything
git_inspector -l hints
# Show only alerts and warnings
git_inspector -l warnings
# Show only alerts
git_inspector -l alerts
To uninstall git_inspector
run
> python -m pip uninstall git_inspector