Send feedback
Class GitSource (3.31.3)
Stay organized with collections
Save and categorize content based on your preferences.
Version latestkeyboard_arrow_down
GitSource ( mapping = None , * , ignore_unknown_fields = False , ** kwargs )
Location of the source in any accessible Git repository.
Attributes
Name
Description
url
str
Location of the Git repo to build.
This will be used as a git remote
, see
https://git-scm.com/docs/git-remote.
dir_
str
Directory, relative to the source root, in which to run the
build.
This must be a relative path. If a step's dir
is
specified and is an absolute path, this value is ignored for
that step's execution.
revision
str
The revision to fetch from the Git repository such as a
branch, a tag, a commit SHA, or any Git ref.
Cloud Build uses git fetch
to fetch the revision from
the Git repository; therefore make sure that the string you
provide for revision
is parsable by the command. For
information on string values accepted by git fetch
, see
https://git-scm.com/docs/gitrevisions#_specifying_revisions.
For information on git fetch
, see
https://git-scm.com/docs/git-fetch.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Class GitSource (3.31.3)\n\nVersion latestkeyboard_arrow_down\n\n- [3.31.3 (latest)](/python/docs/reference/cloudbuild/latest/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.31.2](/python/docs/reference/cloudbuild/3.31.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.30.0](/python/docs/reference/cloudbuild/3.30.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.29.0](/python/docs/reference/cloudbuild/3.29.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.28.0](/python/docs/reference/cloudbuild/3.28.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.27.1](/python/docs/reference/cloudbuild/3.27.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.26.0](/python/docs/reference/cloudbuild/3.26.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.25.0](/python/docs/reference/cloudbuild/3.25.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.24.2](/python/docs/reference/cloudbuild/3.24.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.23.3](/python/docs/reference/cloudbuild/3.23.3/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.22.0](/python/docs/reference/cloudbuild/3.22.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.21.0](/python/docs/reference/cloudbuild/3.21.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.20.1](/python/docs/reference/cloudbuild/3.20.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.19.0](/python/docs/reference/cloudbuild/3.19.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.18.0](/python/docs/reference/cloudbuild/3.18.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.17.1](/python/docs/reference/cloudbuild/3.17.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.16.0](/python/docs/reference/cloudbuild/3.16.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.15.0](/python/docs/reference/cloudbuild/3.15.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.14.0](/python/docs/reference/cloudbuild/3.14.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.13.0](/python/docs/reference/cloudbuild/3.13.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.12.0](/python/docs/reference/cloudbuild/3.12.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.11.1](/python/docs/reference/cloudbuild/3.11.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.10.0](/python/docs/reference/cloudbuild/3.10.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.9.3](/python/docs/reference/cloudbuild/3.9.3/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.8.3](/python/docs/reference/cloudbuild/3.8.3/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.7.1](/python/docs/reference/cloudbuild/3.7.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.6.0](/python/docs/reference/cloudbuild/3.6.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.5.2](/python/docs/reference/cloudbuild/3.5.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.4.0](/python/docs/reference/cloudbuild/3.4.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.3.2](/python/docs/reference/cloudbuild/3.3.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.2.1](/python/docs/reference/cloudbuild/3.2.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.1.1](/python/docs/reference/cloudbuild/3.1.1/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [3.0.2](/python/docs/reference/cloudbuild/3.0.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [2.0.2](/python/docs/reference/cloudbuild/2.0.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [1.1.2](/python/docs/reference/cloudbuild/1.1.2/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [1.0.0](/python/docs/reference/cloudbuild/1.0.0/google.cloud.devtools.cloudbuild_v1.types.GitSource)\n- [0.1.0](/python/docs/reference/cloudbuild/0.1.0/google.cloud.devtools.cloudbuild_v1.types.GitSource) \n\n GitSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nLocation of the source in any accessible Git repository."]]