A spec-compliant `.gitignore` parser for Python (version 1.1.2). It reads `.gitignore` files and matches file paths against the rules, supporting all features of the Git gitignore specification. The library is actively maintained.
pip install gitignorefileVerified import paths — ran on the pinned version, not inferred.
Basic usage: read .gitignore file and check if a path is ignored.
Ensure you pass paths relative to the directory containing the .gitignore file.
Use the `is_ignored_dir` property or check for directory separately.
Update to version 1.0+; the return type is now a list of rules.
Always pass the output of `read_gitignore` to the constructor.
No dependency data recorded yet.