Skip to main content
Version: 1.0-beta

WorkspaceGit

API reference

Local git state for a workspace.

Implements Node

id: ID!

A unique identifier for this WorkspaceGit.

directory: Directory!

Return a self-contained Git metadata directory for this workspace's HEAD, including its full reachable history and an index matching HEAD.

Mount this directory at .git alongside workspace.directory("/") to create a usable checkout. Pending workspace edits remain uncommitted; the original checkout's staging state is not preserved.

This is a snapshot: Git writes to a mounted copy do not update the workspace. The workspace must have a Git repository with a HEAD commit.

The checked-out HEAD of this workspace.

uncommitted: Changeset!

Uncommitted changes in this workspace, using the same rules as GitRepository.uncommitted.

References

Returned by