Excluding files
Some files don't belong in committed history: lockfiles, build output, secrets, anything machine-generated. Merget's ignore rules keep them out of steps entirely — ignored files are never snapshotted, stored, or synced.
Ignore rules exclude files, not transcripts. They do not redact prompts or transcripts. If you paste an API key into your agent's chat, or your agent reads a secret file aloud, that text is committed in the transcript even when the file itself is ignored. See "Secrets accidentally captured".
The .mergetignore file
Create a file named .mergetignore in your repo's root (or any subdirectory —
a nested file applies only to its own subtree) and list patterns, one per line.
The syntax mirrors .gitignore:
# .mergetignore
node_modules/
dist/
*.log
.env
.env.*
!important.log target/(trailing slash) matches directories; everything under a matched directory is excluded.*and**wildcards work as in gitignore.!patternre-includes a path that an earlier or lower-precedence rule excluded.- Lines starting with
#are comments.
You can edit the file by hand, or from the app: the repo's settings dialog (open it from the repo card's menu on the Dashboard) has a Merget Ignore tab with the file's contents and one-click presets for common stacks — Node, Rust, macOS, and Secrets are recommended by default, with Python, Java, Go, and Swift also available. The New Repository dialog offers the same tab at creation time.
What's ignored without any configuration
.git/and.merget/are always ignored. This is built in and cannot be overridden — Merget never commits its own history folder or Git's.- Your existing
.gitignorefiles are honored too. If a path is ignored for Git, it's ignored for Merget — you don't need to duplicate rules. - Per-machine agent configuration (for example
.claude/settings.json,.cursor/hooks.json,.codex/config.toml,.copilot/settings.json) is excluded by default so machine-local agent setup isn't versioned. If you want one of these committed, re-include it from.mergetignore:!.claude/settings.json.
Precedence
From lowest to highest:
- Built-in defaults (the agent-config paths above).
.gitignorefiles..mergetignorefiles.
So a .mergetignore entry always wins over a .gitignore entry for the same
path, and a ! negation in .mergetignore can re-include something the
defaults or .gitignore excluded. Within each kind, deeper files take
precedence over shallower ones for paths in their subtree.
When changes take effect
Immediately. The committing daemon watches ignore files themselves and reloads
the rules the moment a .mergetignore or .gitignore is added, edited, or
removed — no restart needed.
Rules are not retroactive: a file committed before you ignored it remains in the steps that already captured it. Adding the rule only stops future committing. (And as the warning above says, if the file's contents went through a session, they're in the transcript regardless.)
Under the hood
Merget evaluates patterns with the same engine semantics as Git: pattern lists
are scoped to the directory containing the ignore file, evaluated so that
later-loaded (deeper, and .mergetignore-over-.gitignore) lists win, and a
match on a directory excludes the whole subtree beneath it. Ignored paths are
filtered out both when the daemon snapshots your file tree and when it decides
which filesystem events to turn into committed edits — which is why ignored
files never appear even in human-edit steps.
Next: Pausing, disabling, uninstalling · Related: Sync & privacy
