Skip to main content

How configuration works

Unset keys are normally omitted from gat.yaml. Reads use the ; mutating commands write only the selected layer, with Project as the default.

Configuration locations

Global

~/.gat/gat.yamlUser-wide defaults shared by every repository.Committed: No

Project (default)

<repo>/gat.yamlRepository configuration shared with clones.Committed: Yes

Local

<repo>/.gat/gat.yamlMachine-specific repository overrides.Committed: No
Configuration precedence is Global → Project → Local. Named selections, mounts, routes, and remotes replace whole definitions on a same-name collision; different names coexist. Optional default pointers for selections and remotes inherit independently. Adding a resource never chooses a default. Other settings inherit field by field.
Use gat config for general settings and gat remote, gat mount, gat route, or gat selection for named resources. See Config inheritance for overrides and defaults.

Configuration examples

Configuration reference

Remotes

Each named remote has a url. remotes.default chooses the fallback by name; gat remote add never selects it automatically.
Choose a provider and replace its storage names. For authentication and supported URL options, see Remote providers.
S3-compatible services also need an :
Use gat remote default to select a default and gat remote update to change an existing URL. Explicit --remote overrides routes, which override the default. See routing precedence for path-based storage, or Set up a remote for the full workflow.
Keep literal credentials out of committed URLs. Use provider credentials or single-quoted ${NAME} references. Set referenced variables before validating or using the URL. See URL templates.
string
Name of the remote used when no explicit remote or more-specific route applies.Set with: gat remote default
  • Persisted default: unset
  • Example: origin
remote URL
Object-storage URL for one named remote.Set with: gat remote add
  • Persisted default: unset
  • Example: s3://example-bucket/project

Cache

path
Absolute cache path or a path relative to the repository root.Default: <repo>/.gat/objectsSet with: gat config cache.location <value>
  • Persisted default: unset
  • Environment override: GAT_CACHE_DIR (not persisted to gat.yaml)
  • Example: /mnt/gat-cache
list
Ordered fallback modes used to materialize cached objects into the working tree.Default: [copy]Set with: gat config cache.materialization_strategy <value>...
  • Elements: materialization mode
  • Values: reflink | hardlink | symlink | copy
  • Empty list: not allowed
  • Order is significant.
  • Duplicate values are not allowed.
  • Persisted default: unset
  • Example: [reflink, copy]
enum
Copy-and-hash strategy used when publishing local files into the content-addressed cache.Values:
  • safe Stable
  • hybrid Experimental
  • mmap Deprecated
See Feature lifecycle for the guarantees attached to each status.Default: safeSet with: gat config cache.ingest_strategy <value>
  • Persisted default: unset
  • Example: safe

Sync

boolean
Trust recorded materialized state without inspecting the working tree.Default: falseSet with: gat config sync.trust_state <value>
  • Values: true | false
  • Persisted default: unset
  • Example: true
boolean
Fetch missing objects before normal sync reconciliation.Default: falseSet with: gat config sync.auto_fetch <value>
  • Values: true | false
  • Persisted default: unset
  • Example: true
boolean
Re-fetch and rematerialize cache objects found corrupted during sync.Default: falseSet with: gat config sync.auto_repair <value>
  • Values: true | false
  • Persisted default: unset
  • Example: true

Selections

string
Optional default selection name. Inherits independently of named definitions. Without a default, operations select the whole repository. Adding a selection never chooses a default.Set with: gat selection default
  • Persisted default: unset
  • Example: runtime
path
Literal file or directory relative to the repository root. Same-name definitions replace as a whole across layers. An empty definition selects everything.Default: .Set with: gat selection add
  • Persisted default: unset
  • Example: models
list
Include patterns relative to the selected path for sync, pull, fetch, ls-files, status, diff, and push. Any explicit —path, —include, or —exclude replaces the complete configured selection.Default: all tracked paths under the selected pathSet with: gat selection add
  • Elements: glob
  • Empty list: selects everything
  • Order is significant.
  • Persisted default: unset
  • Example: [data/**, models/**]
list
Exclude patterns relative to the selected path. Exclusions win. Explicit CLI selection replaces the complete configured selection.Default: []Set with: gat selection add
  • Elements: glob
  • Empty list: allowed
  • Order is significant.
  • Persisted default: unset
  • Example: [tmp/**]

Lock

integer
lock.shard_levels is Experimental: its interface or behavior may change or be removed between releases. See Feature lifecycle.
Number of hash fan-out directory levels used by the persisted lock.Default: 0Set with: gat config lock.shard_levels <value>
  • Range: 0-2
  • Persisted default: unset
  • Example: 2

Mounts

Git location
Git repository from which this mount imports tracked rows.Set with: gat mount add
  • Persisted default: unset
  • Example: ../models
path
Destination subtree owned by the mount.Default: repository name from the mount URLSet with: gat mount add
  • Persisted default: unset
  • Example: releases/resnet
path
Subtree inside the source repository from which rows are selected.Set with: gat mount add
  • Persisted default: .
  • Example: exports
string
Git revision the mount tracks.Default: source repository default branchSet with: gat mount add
  • Persisted default: unset
  • Example: main
string
Exact commit resolved from the requested mount revision.Set with: resolved automatically by gat mount add and gat mount update
  • Persisted default: unset
list
Glob patterns selecting source rows relative to the mount path.Default: all tracked paths under the selected pathSet with: gat mount add
  • Elements: glob
  • Empty list: selects everything
  • Order is significant.
  • Persisted default: unset
  • Example: [**/*.onnx]
list
Glob patterns excluded from the mount selection.Default: []Set with: gat mount add
  • Elements: glob
  • Empty list: allowed
  • Order is significant.
  • Persisted default: unset
  • Example: [tests/**]

Routes

path
Root-relative tracked-path prefix served by the route.Set with: gat route add
  • Persisted default: unset
  • Example: data/datasets
string
Named remote that serves the route’s path.Set with: gat route add
  • Persisted default: unset
  • Example: backup

Git integration

list
Single-line, non-negated Git-ignore patterns used to derive Gat’s managed .git/info/exclude block.Default: []Set with: gat config git.ignore_patterns <value>...git.exclude_patterns Deprecated — this remains supported for compatibility. Use git.ignore_patterns instead. See Feature lifecycle.
  • Elements: Git-ignore pattern
  • Empty list: allowed
  • Order is significant.
  • Persisted default: unset
  • Example: [*.safetensors, /artifacts/**/*.bin]