Ignore Patterns
Ignore Patterns
Section titled “Ignore Patterns”Control which files are excluded from Confluence sync.
Overview
Section titled “Overview”atlcli supports ignore patterns to exclude files from sync operations:
.atlcliignore- atlcli-specific ignore file.gitignore- Automatically respected (can be disabled)
.atlcliignore File
Section titled “.atlcliignore File”Create a .atlcliignore file in your sync directory:
# Drafts folderdrafts/
# Work in progress files*.wip.md*.draft.md
# Local notesnotes/TODO.md
# Build artifacts_build/.cache/Pattern Syntax
Section titled “Pattern Syntax”Uses gitignore-style patterns:
| Pattern | Matches |
|---|---|
*.md | All .md files in current directory |
**/*.md | All .md files recursively |
drafts/ | Directory named “drafts” |
!important.md | Negation - don’t ignore this file |
docs/*.md | .md files in docs/ only |
**/temp/* | Any file in any “temp” directory |
Examples
Section titled “Examples”# Ignore all files starting with underscore_*
# Ignore test files**/test-*.md**/*.test.md
# Ignore specific directoriesarchive/old-versions/
# But keep specific files in ignored directories!archive/index.md
# Ignore files with specific extensions*.tmp*.bak*.swp
# Ignore hidden files (except .atlcliignore itself).*!.atlcliignoreDefault Ignores
Section titled “Default Ignores”atlcli always ignores these patterns:
.atlcli/ # State directory*.meta.json # Metadata files.git/ # Git directory.gitignore # Git ignore filenode_modules/ # Node dependenciesThese cannot be overridden.
.gitignore Integration
Section titled “.gitignore Integration”By default, .gitignore patterns are also respected:
# Uses both .atlcliignore and .gitignoreatlcli wiki docs pull ./docsDisable gitignore integration:
atlcli wiki docs pull ./docs --no-gitignoreOr in config:
{ "sync": { "respectGitignore": false }}Check Ignored Files
Section titled “Check Ignored Files”See which files are being ignored:
atlcli wiki docs status ./docs --show-ignoredOutput:
Ignored files (12): drafts/new-feature.md (.atlcliignore: drafts/) old-api.draft.md (.atlcliignore: *.draft.md) node_modules/... (default: node_modules/) .git/... (default: .git/)Sync-Specific Ignores
Section titled “Sync-Specific Ignores”Ignore files only for specific operations:
# Ignore during pull onlyatlcli wiki docs pull ./docs --ignore "generated/**"
# Ignore during push onlyatlcli wiki docs push ./docs --ignore "local-only/**"Configuration
Section titled “Configuration”Configure ignores in .atlcli/config.json:
{ "sync": { "ignore": [ "drafts/**", "*.wip.md", "local-notes/" ], "respectGitignore": true }}Pattern Priority
Section titled “Pattern Priority”Patterns are evaluated in order:
- Default ignores (always applied)
.gitignore(if enabled).atlcliignore- Config file ignores
- Command-line
--ignoreflags - Negation patterns (
!pattern)
Later patterns can override earlier ones, except for default ignores.
Use Cases
Section titled “Use Cases”Development Workflow
Section titled “Development Workflow”# .atlcliignore for developmentdrafts/*.local.mdscratch/TODO.mdNOTES.mdMulti-Environment
Section titled “Multi-Environment”# Staging-only pagesstaging-*.md
# Test contenttest/fixtures/Large Repository
Section titled “Large Repository”# .atlcliignore for performance# Ignore large asset directoriesassets/videos/assets/archives/
# Ignore generated docsapi-docs/generated/Selective Sync
Section titled “Selective Sync”# Only sync specific sections# (ignore everything, then un-ignore what you want)*!getting-started/!tutorials/!reference/Debugging
Section titled “Debugging”Verbose output shows ignore processing:
atlcli wiki docs pull ./docs --verbose[ignore] Checking: drafts/new-feature.md[ignore] Matched: drafts/ (.atlcliignore:3)[ignore] Result: IGNORED[ignore] Checking: api-reference.md[ignore] No matches[ignore] Result: INCLUDEDValidate Patterns
Section titled “Validate Patterns”Test your ignore patterns:
# Check if a specific file would be ignoredatlcli wiki docs ignore-check ./docs "drafts/test.md"# Output: IGNORED (matched: drafts/ in .atlcliignore:3)
atlcli wiki docs ignore-check ./docs "api-reference.md"# Output: INCLUDEDRelated Topics
Section titled “Related Topics”- Sync - Sync configuration and behavior
- File Format - Directory structure conventions
- Configuration - Global ignore settings
Jira and Confluence are trademarks of Atlassian Corporation Plc.
atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.