Git Ignore Inspector
Git Ignore Inspector is a read-only command-line tool that shows why a path is ignored, which rule matched, and where that rule is defined. It can also list ignored paths, name the ignore sources in use, find tracked files that match ignore rules, and audit the rules for problems.
Git's own matching is the authority. The tool does not implement a second ignore engine, and it does not modify ignore files, Git configuration, the index, or the work tree.
The PyPI name is lupaxa-git-ignore-inspector. The import path is
lupaxa.git_ignore_inspector. lupaxa is a namespace package. Installing
the package adds two commands for the same program: git-ignore-inspector
and gii.
Install
pip install lupaxa-git-ignore-inspector
Requires Python 3.11 or newer and Git 2.30 or newer. There are no runtime Python dependencies.
You can also run python -m lupaxa.git_ignore_inspector.
Commands
No command is implied. git-ignore-inspector with no command prints help and
exits 3.
| Command | What it Shows |
|---|---|
check |
Whether a path is ignored, tracked, outside the repository, or nested |
explain |
The effective rule and what its pattern constructs mean |
list |
Ignored untracked paths, with Git's collapsed directories by default |
sources |
Root and nested .gitignore files, the exclude file, and global excludes |
tracked |
Tracked files that would match an ignore rule if they were untracked |
audit |
Duplicates, reliable redundant rules, unused rules, and confusing patterns |
stats |
Source, rule, and match counts from the same collapsed enumeration |
An ignored file is a normal check result. It does not by itself produce a
non-zero exit status.
Options
Global options work before or after the command.
git-ignore-inspector --repo ~/src/app check config/local.env
git-ignore-inspector explain src/cache/data.json --json
git-ignore-inspector list --directory src/ --extension .log
git-ignore-inspector list --files --group-by pattern
--repo selects a repository. Paths are still resolved from the current
working directory. --json writes one JSON document to stdout. --verbose
prints the Git invocations on stderr. --quiet shortens the text report.
--color is auto, always, or never. NO_COLOR and a non-interactive
terminal turn colour off.
list --files walks ignored directories and reports individual files.
list --directories reports ignored directories. The default listing keeps
the directory entries Git collapsed, and the text says so.
Configuration
The tool runs without a configuration file. A TOML file can set the output format, colour, audit checks, suppressed finding ids, and the enumeration limit. It cannot change Git's ignore decision.
Search order: --config, GIT_IGNORE_INSPECTOR_CONFIG,
./git-ignore-inspector.toml, <repository>/git-ignore-inspector.toml, then
$XDG_CONFIG_HOME/git-ignore-inspector/config.toml.
output = "text"
color = "auto"
max_results = 10000
expand_ignored_directories = false
unused_rule_analysis = true
[audit]
enabled = ["duplicates", "redundant", "unused", "tracked", "confusing"]
suppressed = []
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Finished with no warnings or confirmed failures |
| 1 | Finished with warnings |
| 2 | Finished with a confirmed diagnostic failure |
| 3 | Invalid arguments or configuration |
| 4 | The command could not complete |
list, sources, and stats treat ordinary ignore data as information.
tracked reports matching files as warnings. audit uses warnings for
potential problems and failures for confirmed problems such as an unreadable
ignore file.
JSON Output
Every command accepts --json. The document includes version, timestamp,
repository, command, result, findings, and summary. Findings use
id, category, status, message, details, and recommendation.
Status is PASS, WARN, FAIL, or SKIP.
Metadata
Release files for lupaxa-git-ignore-inspector 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lupaxa_git_ignore_inspector-0.1.0.tar.gz | 26.5 kB | With provenance | Details for lupaxa_git_ignore_inspector-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lupaxa_git_ignore_inspector-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for lupaxa_git_ignore_inspector-0.1.0-py3-none-any.whl |
Total release size: 58.7 kB
Release files / lupaxa_git_ignore_inspector-0.1.0.tar.gz
| Download URL | lupaxa_git_ignore_inspector-0.1.0.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2aa74c02c7c3f0ff0fc05a87e949fd9125dfb731db52ccc21d05d35b92d93ed0
|
|
BLAKE2b-256 checksum How to use checksums |
83a5c541f9c98aad7020a11ac04c83459a515c480ad26a498d90f6ecddf75ca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / lupaxa_git_ignore_inspector-0.1.0-py3-none-any.whl
| Download URL | lupaxa_git_ignore_inspector-0.1.0-py3-none-any.whl |
|---|---|
| Size | 32.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5358e1d00876f1d687c46671ef5987d5ca0ea23a0ce00bdcbd1fe4fd45165c1
|
|
BLAKE2b-256 checksum How to use checksums |
fb9025c4bb61182fe5e1fb90281b1d947c70b9fbdd62893c94f5b8df26454c95
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for lupaxa-git-ignore-inspector 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lupaxa_git_ignore_inspector-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.