Sync With Remotes
Graft remotes store repository objects, refs, SQLite storage, and external file
payloads outside the local .graft/ directory.
Supported URI families:
memoryfs:///absolute/paths3://bucket/prefixs3_compatible://bucket/prefix?endpoint=https://...https://host/org/spacegraft+http://127.0.0.1:8787/org/spaceAdd A Remote
Section titled “Add A Remote”Use a filesystem remote for local testing:
graft remote add origin fs:///tmp/graft-remotegraft remote listUse S3-compatible storage:
export AWS_ACCESS_KEY_ID="..."export AWS_SECRET_ACCESS_KEY="..."export AWS_REGION="auto"
graft remote add origin 's3_compatible://my-bucket/prod/app?endpoint=https://account.r2.cloudflarestorage.com'Use a Graft HTTP remote:
export GRAFT_REMOTE_TOKEN='grt_...'graft remote add origin 'https://example.com/acme/archive'For a non-default token variable:
export GRAFT_ARCHIVE_TOKEN='grt_...'graft remote add origin 'https://example.com/acme/archive?token_env=GRAFT_ARCHIVE_TOKEN'Push the current branch:
graft push origin mainPush the current branch to its configured upstream:
graft pushPush every local branch:
graft push --all originForce push is available for deliberate non-fast-forward updates:
graft push --force origin mainUse it with the same care you would use git push --force.
Fetch And Pull
Section titled “Fetch And Pull”Fetch updates remote-tracking refs without changing your current branch:
graft fetch origin maingraft fetch --all originPull fast-forwards or enters merge state:
graft pull origin mainIf the branch has an upstream, you can omit the remote and branch:
graft pullClone a remote repository into an empty worktree:
mkdir app-clonecd app-clonegraft clone fs:///tmp/graft-remote mainClone picks the requested branch, materializes tracked database snapshots and
files, and configures origin.
Manage Remotes
Section titled “Manage Remotes”graft remote listgraft remote get-url origingraft remote set-url origin fs:///srv/graft/new-appgraft remote rename origin archivegraft remote remove archivegraft remote prune origingraft ls-remote originSee Remote URIs for exact URI parsing rules and Connect An HTTP Remote for the HTTP client workflow.