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.

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

Write the .gitignore to this file. Defaults to [tool.repomatic] gitignore.location.
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, an aborted prompt (Ctrl-D), or a declined confirmation.
2
A usage error: unknown option, invalid value, missing operand, or an unparsable configuration file.
130
Interrupted with Ctrl-C: the process ends by SIGINT, reported as 130.

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-10-29 8.0.1.dev0