Ignore

Ignore rules exclude noisy files and folders from workspace scanning and snapshots. Use them to skip build outputs, caches, and temporary files so history stays clean and enumeration stays fast.

Quick start

  • On init, Rinne creates rinneignore.jsonin the workspace root (the same level as .rinne/).
  • Rules are applied to workspace-relative paths using / separators.
  • Includes override excludes. Use include* lists or prefix an exclude entry with ! to create exceptions.
  • If a selected save --file or save --dir target is ignored by rinneignore.json, the scoped save fails with an error.

File location

./rinneignore.json
./.rinne/

The default starter file excludes .rinne/**, so workspace metadata stays out of snapshots.

JSON format

The ignore file is JSON. Comments and trailing commas are allowed, so you can keep it readable. UTF-8 and UTF-16 files are accepted. An empty file, or one that contains only whitespace or comments, means no exclusions. If the JSON is broken, save fails with an error instead of silently saving everything.

Rule types

exclude / include
Path patterns matched against the logical path (workspace-relative), using / as separator. Example: Assets/texture.png, bin/app.exe
excludeFiles / includeFiles
File name only (not the full path). Example: *.tmp, *.log
excludeDirs / includeDirs
Directory segment only. Example: temp/, .vs/ (a trailing / is optional)
excludeGlob / includeGlob new in v0.9.8
Standard, gitignore-style glob patterns. Example: node_modules/, *.log, /build/, *.{bak,orig}. See Standard glob keys.

Pattern syntax

Patterns in the six original keys (exclude, excludeFiles, excludeDirs and their include* counterparts) are glob-like and match the entire string (anchored). This syntax is unchanged from v0.9.7, so existing files keep their meaning.

  • * matches any characters except /
  • ** matches across / (any depth)
  • ? matches a single character except /
Examples
bin/**     // everything under bin/
**/*.tmp   // any .tmp file anywhere
cache/     // (excludeDirs) any directory segment named "cache"

Standard glob keys (v0.9.8)

excludeGlob and includeGlob use the same rules as .gitignore, so patterns you already know from Git work as expected.

  • A pattern without / (*.log, node_modules/) matches a name at any depth.
  • A pattern with / (docs/*.md, /build/) is relative to the workspace root. A leading / is optional.
  • A trailing / matches directories only. Matching a directory also matches everything inside it.
  • * and ? do not cross /. **/, /**/, and a trailing /** match any number of directories.
  • [abc], [a-z], [!a], and {a,b} are supported. \ escapes the next character; it is not a path separator.
  • Case sensitivity follows the platform: case-insensitive on Windows, case-sensitive elsewhere.
  • An invalid pattern (such as a reversed range [z-a]) matches nothing; the other patterns still apply.
Example
{
  "excludeGlob": [
    "node_modules/",
    "*.log",
    "/build/",
    "!build/keep.txt"
  ],
  "includeGlob": [
    "build/keep/*.txt"
  ]
}

Rinne v0.9.7 ignores these keys. If the same workspace is also saved with v0.9.7, keep the rules that must apply there in the original keys.

Include wins

Includes override excludes. If a path matches an include rule, it is not ignored even if it also matches an exclude rule. You can write includes in two ways: use include* arrays, or prefix an exclude entry with !. This applies across all keys: an include rule from any key (including includeGlob and ! entries in excludeGlob) overrides an exclude rule from any key.

{
  "exclude": [
    "bin/**",
    "!bin/keep/**"
  ]
}

Traversal behavior (important)

When a directory is ignored, Rinne normally won’t descend into it. However, if your config contains include rules that might match files inside ignored directories, Rinne may still traverse ignored directories to find those included files. This keeps includes reliable, but can increase scan work on very large trees.

Default template

The starter file created by init contains the full structure below (edit it freely):

{
  "exclude": [
    ".rinne/**",
    ".git/**",
    "bin/**",
    "obj/**"
  ],
  "excludeFiles": [
    "*.tmp",
    "*.log",
    "*.user"
  ],
  "excludeDirs": [
    "cache/",
    "temp/",
    ".vs/"
  ],
  "include": [],
  "includeFiles": [],
  "includeDirs": []
}

Behavior notes

Ignore rules affect workspace scanning during save. They help keep new snapshots focused on the files you actually want.

Changing rinneignore.json does not rewrite existing snapshots. It only changes how future workspace scans behave.

Early Access note: ignore behavior may evolve. Keep rules minimal and explicit.