> ## Documentation Index
> Fetch the complete documentation index at: https://docs.studiograph.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync & local checkouts

> Clone a hosted workspace to your machine and move content with pull and push.

A workspace is one Git repository: every folder's content lives in it, with configuration alongside in `.studiograph/`. That means an owner can keep a full local checkout of the workspace and sync it with the server. This is owner-oriented tooling — day-to-day collaboration happens in the web app.

## Clone a workspace

```bash theme={null}
studiograph clone <server-url>
```

`clone` signs in with your owner email and password (via the `STUDIOGRAPH_EMAIL` and `STUDIOGRAPH_PASSWORD` environment variables), downloads the full workspace, and stores an `sg_` token in `~/.studiograph/user.json` so later syncs don't need credentials.

## Pull and push

```bash theme={null}
studiograph pull
studiograph push
```

Both commands move two things:

* **Content** — entries and folder structure, transferred as Git over the server's embedded Git endpoint at `<server>/git`.
* **Configuration** — workspace settings such as the team name and description.

Pass `--remote <url>` to target a specific server and `--token <token>` to override the stored token (`STUDIOGRAPH_TOKEN` also works).

## What doesn't sync

The Git repository holds text content only. These live outside it and are not moved by `pull`/`push`:

| Not synced                | What it is                                           |
| ------------------------- | ---------------------------------------------------- |
| Uploaded files and assets | Local asset storage or an R2 bucket                  |
| User accounts database    | Who can sign in                                      |
| Secrets                   | API keys and connector credentials, stored encrypted |

Back these up separately — see [Storage and backups](/self-hosting/storage-and-backups).

## Diverged copies

If the local checkout and the server have both changed since the last sync, `pull` and `push` fail with a clear error and a non-zero exit code. Resolve the divergence manually with Git, then sync again.

<Note>
  If you pull into a workspace that's currently being served, restart `studiograph serve` so the server picks up the new content.
</Note>
