Skip to main content

Git Ignore Support

Add a .gitignore file in your project root to exclude files or folders from publishing. SrcNexus Code Editor uses standard Git ignore pattern matching, so you can use the same patterns you're familiar with.

How It Works

When you publish a project, SrcNexus Code Editor scans for .gitignore files throughout your project directory structure. Each .gitignore file's rules are scoped to its directory and all subdirectories. Multiple .gitignore files are merged together, with later matching rules taking precedence (following Git's "last match wins" behavior).

Supported Patterns

  • Wildcards: Use * to match any characters except /, and ** to match across directory boundaries
  • Directory patterns: End a pattern with / to match only directories (e.g., node_modules/)
  • Negation: Start a pattern with ! to un-ignore files that would otherwise be ignored
  • Anchored patterns: Start with / to match from the .gitignore file's directory only
  • Comments: Lines starting with # are ignored (unless escaped with \#)

Examples

# Ignore all node_modules folders
node_modules/

# Ignore build outputs
dist/
build/
*.min.js

# But keep important minified files
!vendor.min.js

# Ignore secrets but allow examples
.env
!.env.example

Important Notes

  • Ignored files are not uploaded when you publish your project
  • Ignored files are included in exported backups (.zip files)