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

# Fast repository checkouts with Git snapshots

Git snapshots speed up checkouts by replacing Buildkite's default Git clone with a pre-fetched snapshot of the repository. A job downloads and extracts the snapshot instead of fetching Git history and checking out every file itself.

This is most useful for large repositories where checkout time is a significant part of each job. Snapshots are keyed by the resolved commit, so jobs that build the same commit reuse the same immutable snapshot.

<Info>
  Git snapshots are in **early access**. Reach out to enable them for your workspace.

  [Contact support →](mailto:support@namespace.so)
</Info>

Buildkite snapshot checkouts currently support GitHub and Cursor Origin repositories on Namespace Linux and macOS agents.

## Enable Git snapshots for your organization

1. Connect your GitHub account or Cursor Origin through [Code providers](https://cloud.namespace.so/workspace/code/providers).
2. Open **Buildkite → Organizations** in the [Namespace dashboard](https://cloud.namespace.so/workspace/buildkite/organizations) and select your Buildkite organization.
3. Click the toggle to enable Git snapshots.

You can also select **Enable Git snapshots** when connecting a new Buildkite organization.

## Use a snapshot in a job

Set the `nsc-git-checkout` [agent tag](/docs/solutions/buildkite-agents/configuration) to `snapshot`. Set it in the top-level `agents` block to use snapshot checkouts for every command step in the pipeline:

```yaml theme={null}
agents:
  nsc-os: "linux"
  nsc-arch: "amd64"
  nsc-shape: "8x16"
  nsc-git-checkout: "snapshot"

steps:
  - label: ":test_tube: Test"
    command: "go test ./..."
```

Or set it on an individual step:

```yaml theme={null}
steps:
  - label: "Build"
    command: "make build"
    agents:
      queue: "default"
      nsc-git-checkout: "snapshot"
```

Namespace's Buildkite checkout hook uses the pipeline's GitHub repository and commit automatically. You do not need to add a checkout command to the step.

Only jobs with this tag use snapshots. Other jobs continue to use Buildkite's default checkout behavior. To explicitly select the default Git clone, for example for a single step in a pipeline that otherwise uses snapshots, set `nsc-git-checkout` to `clone` or `default`.

## How it works

Whenever a ref is requested, Namespace generates a snapshot of the repository contents and serves it from an internal Namespace mirror.

When multiple jobs request the same ref, as commonly happens in CI, the same snapshot is served to each job. This amortizes the checkout time across those jobs.

Snapshots are ephemeral and are removed automatically after some time.
