2.23.0 (latest) 2.22.0 2.21.0 2.20.0 2.19.0 2.18.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    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.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Dependency.Types.GitSourceDependency

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[Dependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.md.txt)[GitSourceDependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Dependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.md.txt)[GitSourceDependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[Dependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.md.txt)[Types](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.md.txt)[GitSourceDependency](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.Dependency.Types.GitSourceDependency.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.CloudBuild.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V1/latest/Google.Cloud.CloudBuild.V1.md.txt)

## Assembly

Google.Cloud.CloudBuild.V1.dll

## Constructors

### GitSourceDependency()

    public GitSourceDependency()

### GitSourceDependency(GitSourceDependency)

    public GitSourceDependency(Dependency.Types.GitSourceDependency other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `DependencyTypesGitSourceDependency` |

## Properties

### Depth

    public long Depth { get; set; }

Optional. How much history should be fetched for the build (default 1, -1
for all history).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `long` |   |

### DestPath

    public string DestPath { get; set; }

Required. Where should the files be placed on the worker.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### FetchTags

    public bool FetchTags { get; set; }

Optional. True if remote tags should be fetched too (default false).
Note: when depth is 1 (default), git fetch only retrieves tags pointing
to commits within the shallow boundary. Set depth to -1 to fetch all
historical tags.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### RecurseSubmodules

    public bool RecurseSubmodules { get; set; }

Optional. True if submodules should be fetched too (default false).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### Repository

    public Dependency.Types.GitSourceRepository Repository { get; set; }

Required. The kind of repo (url or dev connect).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `DependencyTypesGitSourceRepository` |   |

### Revision

    public string Revision { get; set; }

Required. The revision that we will fetch the repo at.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |