public sealed class Dependency.Types.GitSourceDependency : IMessage<Dependency.Types.GitSourceDependency>, IEquatable<Dependency.Types.GitSourceDependency>, IDeepCloneable<Dependency.Types.GitSourceDependency>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Build v1 API class Dependency.Types.GitSourceDependency.
Represents a git repository as a build dependency.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-19 UTC."],[[["\u003cp\u003eThis webpage provides documentation for the \u003ccode\u003eGitSourceDependency\u003c/code\u003e class within the Google Cloud Build v1 API, which represents a git repository as a build dependency.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGitSourceDependency\u003c/code\u003e class implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, allowing it to be used with various Google Protobuf and .NET functionalities.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the documentation is for version 2.15.0, and the page also includes links to documentation for versions ranging from 1.0.0 to 2.14.0.\u003c/p\u003e\n"],["\u003cp\u003eThe class has properties such as \u003ccode\u003eDepth\u003c/code\u003e, \u003ccode\u003eDestPath\u003c/code\u003e, \u003ccode\u003eRecurseSubmodules\u003c/code\u003e, \u003ccode\u003eRepository\u003c/code\u003e, and \u003ccode\u003eRevision\u003c/code\u003e, which are used to specify how and where the repository should be fetched.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGitSourceDependency\u003c/code\u003e class has two constructors, one default and another to clone from an existing \u003ccode\u003eGitSourceDependency\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["# Cloud Build v1 API - Class Dependency.Types.GitSourceDependency (2.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.16.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.15.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.15.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.14.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.14.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.13.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.13.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.12.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.12.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.11.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.11.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.10.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.10.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.9.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.9.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.8.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.8.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.7.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.7.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.6.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.5.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.4.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.3.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.2.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.1.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/2.0.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.4.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.3.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.2.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.1.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/1.0.0/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency) \n\n public sealed class Dependency.Types.GitSourceDependency : IMessage\u003cDependency.Types.GitSourceDependency\u003e, IEquatable\u003cDependency.Types.GitSourceDependency\u003e, IDeepCloneable\u003cDependency.Types.GitSourceDependency\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Build v1 API class Dependency.Types.GitSourceDependency.\n\nRepresents a git repository as a build dependency. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Dependency.Types.GitSourceDependency \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Dependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types)[GitSourceDependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Dependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types)[GitSourceDependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Dependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency)[Types](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types)[GitSourceDependency](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.CloudBuild.V1](/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudBuild.V1.dll\n\nConstructors\n------------\n\n### GitSourceDependency()\n\n public GitSourceDependency()\n\n### GitSourceDependency(GitSourceDependency)\n\n public GitSourceDependency(Dependency.Types.GitSourceDependency other)\n\nProperties\n----------\n\n### Depth\n\n public long Depth { get; set; }\n\nOptional. How much history should be fetched for the build (default 1, -1\nfor all history).\n\n### DestPath\n\n public string DestPath { get; set; }\n\nRequired. Where should the files be placed on the worker.\n\n### RecurseSubmodules\n\n public bool RecurseSubmodules { get; set; }\n\nOptional. True if submodules should be fetched too (default false).\n\n### Repository\n\n public Dependency.Types.GitSourceRepository Repository { get; set; }\n\nRequired. The kind of repo (url or dev connect).\n\n### Revision\n\n public string Revision { get; set; }\n\nRequired. The revision that we will fetch the repo at."]]