Skip to main content

GitRef

API reference

A git ref (tag, branch, or commit).

Implements Node

commit: String!

The resolved commit id at this ref.

id: ID!

A unique identifier for this GitRef.

ref: String!

The resolved ref name at this ref.

commonAncestor(other: GitRef!): GitRef!

Find the best common ancestor between this ref and another ref.

other: GitRef!

The other ref to compare against.

tree(discardGitDir: Boolean = false,depth: Int = 1,includeTags: Boolean = false): Directory!

The filesystem tree at this ref.

discardGitDir: Boolean = false

Set to true to discard .git directory.

depth: Int = 1

The depth of the tree to fetch.

includeTags: Boolean = false

Set to true to populate tag refs in the local checkout .git.

References

Returned by

Accepted as an argument by