Git snapshots are in early access. Reach out to enable them for your workspace.Git snapshots are intended to supersede Git checkout caching.Contact support →
Requirements
- A GitHub repository.
- A Namespace Linux or macOS runner.
- A GitHub association that gives Namespace read-only access to the target organization and repositories.
Use Git snapshots in a workflow
Replaceactions/checkout with namespace-actions/code-checkout:
$GITHUB_SHA) into $GITHUB_WORKSPACE. It uses the runner’s Namespace credentials, so no GitHub token is needed.
The same step works on Linux and macOS runners, on both x64 and arm64. To run the job on macOS, replace runs-on with your Namespace macOS runner profile.
Inputs
For example, to check out into a subdirectory and also fetch
main for comparison:
ref: ${{ github.event.pull_request.head.sha }}.
Differences from actions/checkout
The action does not support everyactions/checkout option:
- It does not clean a nonempty destination or persist GitHub credentials.
- It does not expose submodule, LFS, sparse-checkout, or fetch-depth settings.
- GitHub Enterprise and Windows runners are not supported.
- Snapshot and authentication failures fail the step. There is no fallback to a direct Git clone.