π Using .gittxtignore¶
The .gittxtignore file allows you to exclude specific files or directories from a Gittxt scan using gitignore-style syntax. Itβs ideal for filtering out logs, binaries, or any content irrelevant to your dataset.
π Location¶
Place the .gittxtignore file in the root of the repository or folder you plan to scan.
π§ How It Works¶
- Gittxt reads
.gittxtignorepatterns before scanning begins. - These patterns take precedence over CLI include/exclude patterns.
- Filters apply only to the current project (not global).
β Supported Syntax¶
- File globs:
*.log,*.zip - Folder exclusions:
node_modules/,__pycache__/ - Relative paths:
docs/temp.md - Comments: Lines starting with
#are ignored
# Ignore logs and temporary files
*.log
*.tmp
# Ignore build and test folders
build/
tests/
# Skip backup markdown files
README_backup.md
β οΈ Notes¶
.gittxtignoreis not the same as.gitignore(unless you use--sync).- You can combine
.gittxtignorewith CLI options or config settings.
π Debugging¶
Use debug mode to view active ignore patterns:
gittxt scan . --log-level debug
Next: Interactive Config β‘