GitRef
API reference
A git ref (tag, branch, or commit).
Implements Node
commit- The resolved commit id at this ref.
commitSHA- The resolved commit SHA at this ref.
id- A unique identifier for this GitRef.
name- The resolved name of this ref.
ref- The resolved ref name at this ref.
asWorkspace- Creates a synthetic workspace from this git ref.
commonAncestor- Find the best common ancestor between this ref and another ref.
log- Commits reachable from this ref, newest first, starting with the commit this ref resolves to.
targetCommit- The commit this ref resolves to.
tree- The filesystem tree at this ref.
commit: String!Deprecated
The resolved commit id at this ref.
Deprecated: Use "commitSHA" instead.
commitSHA: String!
The resolved commit SHA at this ref.
id: ID!
A unique identifier for this GitRef.
name: String!
The resolved name of this ref.
ref: String!Deprecated
The resolved ref name at this ref.
Deprecated: Use "name" instead.
asWorkspace(cwd: String = "/"): Workspace!
Creates a synthetic workspace from this git ref.
cwd: String = "/"Current working directory inside the workspace root. Defaults to the workspace root.
commonAncestor(other: GitRef!): GitRef!
Find the best common ancestor between this ref and another ref.
other: GitRef!The other ref to compare against.
log(limit: Int = 10,paths: [String!],base: GitRef): [GitCommit!]!
Commits reachable from this ref, newest first, starting with the commit this ref resolves to.
limit: Int = 10Maximum number of commits to return.
paths: [String!]Only include commits touching these paths, relative to the root of the repository.
base: GitRefExclude commits reachable from this ref, i.e. only list commits added on top of it.
targetCommit: GitCommit!
The commit this ref resolves to.
tree(discardGitDir: Boolean = false,depth: Int = 1,includeTags: Boolean = false): Directory!
The filesystem tree at this ref.
discardGitDir: Boolean = falseSet to true to discard .git directory.
depth: Int = 1The depth of the tree to fetch.
includeTags: Boolean = falseSet to true to populate tag refs in the local checkout .git.
References
Returned by
Address.gitRefGitCommit.ancestorReleaseTagGitCommit.releaseTagGitRepository.branchGitRepository.headGitRepository.latestVersionGitRepository.refGitRepository.tagWorkspaceGit.head