REPOMATIC-SYNC-GITIGNORE(1) REPOMATIC-SYNC-GITIGNORE(1)

repomatic sync-gitignore - Sync .gitignore from gitignore.io templates

repomatic sync-gitignore [OPTIONS]

Sync a .gitignore file from gitignore.io templates.

Fetches templates for a base set of categories plus any extras from [tool.repomatic] config, then appends gitignore-extra-content. Writes to the path specified by gitignore-location (default ./.gitignore).

The generated file is the whole file: nothing is read back from the copy on disk. A rule added there by hand is therefore dropped on the next sync, so the write aborts when it would lose one. Move the rule into gitignore-extra-content to keep it, or pass --drop-orphans to let it go.

Output path. Defaults to gitignore-location from [tool.repomatic] config.
Overwrite rules found on disk but absent from the generated file, instead of refusing to drop them.
Show this message and exit.

Output path. Defaults to gitignore-location from [tool.repomatic] config.
Overwrite rules found on disk but absent from the generated file, instead of refusing to drop them.
Show this message and exit.

0
Success.
1
A runtime error, or an aborted prompt (Ctrl-C, a declined confirmation).
2
A usage error: unknown option, invalid value, missing operand, or an unparsable configuration file.

Generate .gitignore using config from pyproject.toml

repomatic sync\-gitignore

Write to custom location

repomatic sync\-gitignore \-\-output ./custom/.gitignore

Preview on stdout

repomatic sync\-gitignore \-\-output \-

Kevin Deldycke

2026-09-14 7.15.1.dev0