FindDefaultBranchName
Finds the name of the default branch (typically “main” or “master”).Request
The repository to query
Response
The name of the default branch (without “refs/heads/” prefix)
Example
FindBranch
Finds a branch by its unqualified name and returns the commit it points to.Request
The repository to search in
Branch name only (without “refs/heads/” prefix)
Response
The branch object, or null if not found
Example
FindAllBranchNames
Returns all branch names in the repository.Request
The repository to list branches from
Response (Stream)
Array of branch names
FindLocalBranches
Finds all local branches with detailed information.Request
The repository to list branches from
Sort order: NAME, UPDATED_ASC, or UPDATED_DESC
Pagination configuration. The page token is the branch name with “refs/heads/” prefix.
Response (Stream)
Array of local branches
Branch name
Commit ID the branch points to
Subject line of the commit
Author of the commit
Committer of the commit
Full commit object
Example
FindAllBranches
Finds all branches, optionally filtered to only merged branches.Request
The repository to list branches from
Only return branches merged into the root ref
If merged_only is true, this is the list of branches to check
Response (Stream)
Array of branches
Branch name
Commit the branch points to
FindTag
Finds a specific tag by name.Request
The repository to search in
Name of the tag to find
Response
The tag object, or null if not found
Example
FindAllTagNames
Returns all tag names in the repository.Request
The repository to list tags from
Response (Stream)
Array of tag names
FindAllTags
Returns all tags in the repository with full tag objects.Request
The repository to list tags from
Sort configuration with key (REFNAME or CREATORDATE) and direction
Pagination configuration. The page token is the tag name with “refs/tags/” prefix.
Response (Stream)
Array of tags
Example
FindAllRemoteBranches
Finds all branches from a specific remote.Request
The repository to search in
Name of the remote
Response (Stream)
Array of remote branches
RefExists
Checks if a reference exists.Request
The repository to check in
Fully qualified reference name (must start with “refs/“)
Response
True if the reference exists
Example
ListRefs
Lists all references matching given patterns. Symbolic references are resolved to the object ID they point at.Request
The repository to list refs from
Patterns in the format accepted by git-for-each-ref(1). At least one pattern must be given. Non-matching patterns are silently ignored.
Whether to include the HEAD reference. By default, pseudo-refs are not included.
Sort configuration with key (REFNAME, CREATORDATE, AUTHORDATE, or COMMITTERDATE) and direction
Response (Stream)
Array of references found
Fully qualified name of the reference
Object ID the reference points to
Example
FindRefsByOID
Finds all fully qualified reference names that point to a specific object ID.Request
The repository to search in
Object ID to find references for (can be a prefix)
Patterns to filter references. Can be branch names, tag names, or fully qualified ref names. If empty, defaults to “refs/heads/” and “refs/tags/”.
Sort field for results. If empty, defaults to “refname” (lexicographic order).
Maximum number of results. 0 means no limit.
Response
Array of fully-qualified reference names
Example
DeleteRefs
Deletes multiple references.Request
The repository to delete refs from
Delete all refs except those with these prefixes (mutually exclusive with refs)
Specific refs to delete (mutually exclusive with except_with_prefix)
Response
Error message if the operation failed, empty on success
ListBranchNamesContainingCommit
Lists all branch names that contain a specific commit.Request
The repository to search in
The commit ID to search for
Maximum number of branch names to return. 0 means return all.
Response (Stream)
Array of branch names containing the commit
Example
ListTagNamesContainingCommit
Lists all tag names that contain a specific commit.Request
The repository to search in
The commit ID to search for
Maximum number of tag names to return. 0 means return all.
Response (Stream)
Array of tag names containing the commit
GetTagSignatures
Retrieves signatures for annotated tags. Revisions which don’t resolve to an annotated tag are silently discarded. Tags which are annotated but not signed will return a response with no signature, but unsigned contents will still be returned.Request
The repository to retrieve tag signatures from
Set of revisions to look up. Supports syntax as specified by gitrevisions(7). All revisions are expected to resolve to annotated tag objects. At least one revision must be provided.
Response (Stream)
Array of tag signatures found
Resolved object ID of the tag
Cryptographic signature of the tag. Unset if the tag is not signed.
Contents which are signed by the signature. Includes both message and metadata.
Example
GetTagMessages
Retrieves messages from annotated tags.Request
The repository to retrieve tag messages from
Array of tag IDs
Response (Stream)
The tag ID. Only present for a new tag message.
The tag message