Combine file exclusions
By default, Gat writes an exact.git/info/exclude rule for each tracked path
that has no newline. For a directory used only for Gat assets, replace thousands
of exact rules with a broad pattern:
!keep.txt are unsupported.
Keep temporary files out of Gat
Keep temporary files out of Gat
.gatignore filters files during gat add. For example:.gatignore
git.ignore_patterns controls Git exclusions after tracking. .gatignore
controls which files Gat ingests.Filenames containing newlines
Filenames containing newlines
Git’s ignore format cannot express an exact path containing LF. Gat records
an escaped comment instead. The file remains visible to Git unless a broader
pattern covers it. Review
git status before staging.Shard a very large gat.lock
A flat lock is simplest for most repositories. If small add, rm, or mv
operations spend substantial time rewriting it, start with one shard level:
gat.lock/a4.tsv.
Routine sparse updates can then rewrite only affected shards.
1
Choose the layout
Use
1 to start. 2 adds another level, such as gat.lock/a4/7f.tsv, at the
cost of more directories. 0 returns to a flat lock.2
Convert and review
The next lock-writing or reshaping command, such as
gat sync, converts the
full lock once. Inspect the resulting metadata with Git.3
Commit the shared setting and lock
What sharding does and does not speed up
What sharding does and does not speed up
Sharding reduces lock rewrites. Explicit root-anchored directory exclusions
such as
/models/ also let Gat skip covered ranges while rebuilding Git
exclusions. Other patterns may still require checking individual paths.Existing state databases pay a one-time indexing cost. Memory and output size
still grow with uncovered paths. Measure the full command, not just lock writes.Avoid unnecessary copying during materialization
Copy-on-write clones share disk blocks until a file changes; edits keep the cache intact. Try them with an independent-copy fallback:
Changing the setting affects future materializations. To recreate already-correct
files using the new strategy:
Reconcile less of a huge repository
For one operation:--path . selects
all repository paths. See Path selection.
Reuse a cache across repositories
Choose a writable directory shared by the clones that reuse content:GAT_CACHE_DIR overrides the configured location. Identical bytes share one
cached object, avoiding repeated storage and downloads.
Choose a faster ingest strategy
happens when you add or update tracked content.- Safe (default)
- Hybrid (experimental)
Use the trust-state fast path for sync
Normal sync checks file metadata and hashes content only when needed. If even those checks are expensive, you can trust recorded state for one run:Configuration reference
Defaults, constraints, and accepted values.
Sync reference
Preview, fetch, repair, and rematerialize files.

