Sync & Write-back
Your local Worktree is always the source of truth. offrig transfers only the files that changed since the last sync and protects local edits during Write-back.
Delta push
Section titled “Delta push”Before each Run, offrig computes the changed paths in your Worktree (respecting .gitignore, .offrigignore, and [sync].remote_only) and streams the delta to the Worker (offrigd) inside your Sandbox.
Remote-only paths
Section titled “Remote-only paths”Heavy build outputs and dependency trees belong on the remote Rig, not on your laptop’s SSD. Remote-only paths are:
- Excluded from sync in both directions (never pushed from local, never pulled in Write-back)
- Protected from sync deletion inside Deps Snapshots and Sandboxes
Common paths like node_modules, /target, .venv, and .turbo are configured automatically or via [sync].remote_only:
[sync]remote_only = ["node_modules", "/target", ".venv", ".turbo"]To explicitly sync a gitignored file from inside the Worktree (such as a generated fixture), list it under [sync].include. Paths in sync.include may never escape the Worktree root (.. or symlinks outside the root are rejected).
.git visibility ([sync].git)
Section titled “.git visibility ([sync].git)”Control how much git metadata the Sandbox sees:
| Mode | Behavior |
|---|---|
auto (default) |
Syncs .git metadata up to [sync].git_max_bytes (default 100 MiB / 104857600 bytes); falls back gracefully for oversized repos. |
full |
Always syncs the full .git view needed for git-aware build tools. |
off |
Omits .git from the Sandbox completely. |
Guarded Write-back & Conflict Protection
Section titled “Guarded Write-back & Conflict Protection”When a Run exits normally, the Worker reports every addition, edit, and deletion made on synced paths inside the Sandbox. Before writing them back to your laptop, offrig checks whether any affected file changed locally while the remote Run was executing.
Control conflict behavior with [sync].conflict or --conflict <policy>:
| Policy | Behavior on local edit during Run |
|---|---|
fail (default) |
Aborts Write-back atomically, leaves your local Worktree untouched, and exits with code 124. |
overwrite |
Applies remote changes over conflicting local edits. |
keep-local |
Applies non-conflicting remote edits while preserving your local version of conflicting files. |
Recovering from exit 124
Section titled “Recovering from exit 124”When a Run exits 124, your remote changes are still safely intact inside the Sandbox. Inspect or pull them explicitly:
# Pull remote changes back with conflict protectionoffrig sync pull
# Or inspect / override conflicts explicitlyoffrig sync pull --conflict keep-localoffrig sync pull --conflict overwriteRead-only Runs and selective pulls
Section titled “Read-only Runs and selective pulls”Skip automatic Write-back completely with --ro, or pull only specific generated artifacts with --pull <GLOB> (repeatable):
offrig --ro cargo testoffrig --ro --pull 'dist/**' pnpm build