Skip to content
C3Control / Continuity
Sync documentation
C3Sync

C3Sync / Operations

Updated 2026-07-24 · C3Sync commit-aware auto-pull design

Git integration & auto-pull

C3Sync moves working-tree bytes between machines continuously. Git commits are a separate layer — and without help, they create the classic machine-switch trap: you commit and push on machine A, walk to machine B, and B has the same file contents but a stale HEAD, so git pull refuses ("local changes would be overwritten") even though the changes are byte-identical to what the commits contain.

C3Sync closes this gap with commit-aware auto-pull.

What happens automatically

When you commit and push on one machine, the daemon announces the new git head to your other machines (over the same encrypted hub). Each peer whose checkout is on the same branch then:

  1. Fetches from the project's real remote using your normal git credentials.
  2. Fast-forwards only. History is never rewritten and merges are never invented.
  3. Absorbs redundant modifications — where C3Sync already propagated the exact bytes the incoming commits contain, those "local changes" are recognized as identical and absorbed cleanly.
  4. Preserves unrelated WIP. Uncommitted work in files the incoming commits don't touch is left exactly as it was — no stashing.
  5. Stops safely on real divergence. If a locally-modified file genuinely differs from what the commits bring, the pull is blocked and reported rather than guessed at.

The push itself is never automated: C3Sync never pushes for you. Publishing history is always your explicit action; auto-pull only propagates what you already published.

Doing it by hand

sh
c3sync reconcile [path]

Runs the same fetch + fast-forward + reconcile pass immediately and reports one of: advanced (pulled forward), up-to-date, ahead (you have unpushed commits), diverged, blocked (a genuinely-conflicting local modification), or skipped.

c3sync status also shows each project's git position at a glance: up to date, behind N, ahead N, or diverged, plus the uncommitted-file count.

Credentials for fetching

The daemon fetches with your ambient git setup — whatever git fetch uses in your shell (SSH agent, credential helpers). On headless machines or where the daemon shouldn't inherit an agent, pin a dedicated read key in ~/.c3sync/config.json:

json
{ "git_ssh_key": "/home/you/.ssh/c3sync_readonly_ed25519" }

When set, fetches use exactly that identity and nothing else.

Interplay with stale-history protection

Auto-pull is the forward half of C3Sync's git awareness; the committed-history guard is the backward half. Together: a machine that's behind gets pulled forward automatically, and a machine that's behind can never silently revert content your newer commits already protect. If a peer's uncommitted state genuinely reverts committed content in a way that can't converge, C3Sync surfaces it as a conflict with a .conflict sidecar instead of dropping it silently — see safety and conflicts.