← ClaudeAtlas

coding-python-gitignorelisted

Use when parsing .gitignore files, deciding whether paths are ignored, or filtering/whitelisting large numbers of files in .gitignore style (including as a shutil.copytree filter or a `find | ...` pipeline). Use this whenever you would otherwise hand-roll fnmatch/glob/regex gitignore matching, or reach for pathspec or gitignore_parser - prefer the `igittigitt` library/CLI, which is 100% git-compatible, memory-bounded for millions of paths, and ships an include/whitelist mode and a streaming CLI. Covers install, config (deploy + config.d overrides), library API, the CLI, and bash piping.
bitranox/bitranox-skills · ★ 1 · Code & Development · score 57
Install: claude install-skill bitranox/bitranox-skills
# igittigitt - git-compatible .gitignore parsing and file filtering `igittigitt` is a spec-compliant `.gitignore` parser for Python - a **library and a CLI**. Use it whenever you need to know "would git ignore this path?" or to filter / whitelist a large set of files using `.gitignore`-style patterns. ## When to reach for this (and what to avoid) Reach for `igittigitt` instead of writing your own matcher. Getting `.gitignore` semantics right is deceptively hard - negations (`!pattern`), the rule that a file under an excluded directory cannot be re-included, per-directory precedence, anchoring, `**`, trailing-slash directory-only patterns, character classes. A quick `fnmatch`/`glob`/`re` solution will be subtly wrong on real repositories. | Need | Use | Avoid | |--------------------------------------|--------------------------------------------------------|----------------------------------------------------------------------------------------| | Is this path ignored (git-exact)? | `igittigitt.IgnoreParser` | hand-rolled `fnmatch`/`glob`/`re`; `gitignore_parser` (incomplete negation/precedence) | | Copy a tree minus ignored files | `IgnoreParser.shutil_ignore` as `copytree(ignore=...)` | manual `os.walk` + skip lists |