<!--
{
  "documentType" : "article",
  "framework" : "AppStoreConnectAPI",
  "identifier" : "/documentation/AppStoreConnectAPI/git-references",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Git References"
}
-->

# Git References

Read information about the canonical reference for a Git branch or tag.

## Discussion

The `scmGitReferences` resource represents the canonical Git reference for the Git commit that Xcode Cloud used to perform a build. The resource includes the following information:

- The reference’s name and canonical name
- Whether the reference has been deleted
- The type of the reference

For example, if Xcode Cloud uses the `bug-fix` branch for a build, the canonical Git reference is `refs/heads/bug-fix` and the name is `bug-fix`. If Xcode Cloud starts a build for the `release-1.0` tag, the canonical name is `refs/tags/release-1.0` and the name is `release-1.0`.

> Note:
> This resource supports JSON web tokens with a lifetime of up to six months. For more information, see <doc://com.apple.appstoreconnectapi/documentation/AppStoreConnectAPI/generating-tokens-for-api-requests#Determine-the-Appropriate-Token-Lifetime>.

## Topics

### Getting Information About Git References

[`Read git reference information`](/documentation/AppStoreConnectAPI/GET-v1-scmGitReferences-_id_)

Get information about a specific Git reference.

### Objects

[`object ScmGitReference`](/documentation/AppStoreConnectAPI/ScmGitReference)

A Git branch, tag, or commit reference in a source code repository connected to Xcode Cloud.

[`object ScmGitReferenceResponse`](/documentation/AppStoreConnectAPI/ScmGitReferenceResponse)

The response body for endpoints that read a single SCM Git reference in Xcode Cloud.

[`object ScmGitReferencesResponse`](/documentation/AppStoreConnectAPI/ScmGitReferencesResponse)

The response body for endpoints that list Git references in an Xcode Cloud repository.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)