---
title: "SDK: git"
description: "The git methods of the Overlane TypeScript SDK, with their signatures. Generated from the SDK types."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.overlane.app/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK: git

{/* Generated by apps/docs/scripts/generate.mjs (SDK pages from the TypeScript types in packages/sdk). Do not edit; run `pnpm --filter @overlane/docs gen`. */}

The `git` area has 34 methods on the client. Each takes one object of path, query and body arguments and an optional `CallOptions`, and returns a promise of the response body. A refused call rejects with `OverlaneApiError` (see the [SDK index](/sdk/)).

## gitAccessClear

Clear a member's repository role so the team role applies again

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/access/{repo}`

```ts
gitAccessClear(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitAccessList

List the members whose access is narrowed on a repository

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/access`

```ts
gitAccessList(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<RepoAccessList>
```

## gitAccessPut

Narrow one member's role on a repository (never above their team role)

- Request: `PUT` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/access/{repo}`

```ts
gitAccessPut(args: { tenantId: string; projectId: string; repoId: string; repo: string; body: PutRepoAccessRequest }, options?: CallOptions): Promise<RepoAccessEntry>
```

## gitBranchesCreate

Create a branch

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/branches`

```ts
gitBranchesCreate(args: { tenantId: string; projectId: string; repoId: string; body: CreateBranchRequest }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitBranchesDelete

Delete a branch

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/branches/{repo}`

```ts
gitBranchesDelete(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitBranchesList

List a repository's branches

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/branches`

```ts
gitBranchesList(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<BranchListResponse>
```

## gitCommitDiff

Read a commit's full diff against its first parent

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/commits/{repo}/diff`

```ts
gitCommitDiff(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<CommitDiffResponse>
```

## gitCompare

Read the full diff between two refs (base...head)

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/compare`

```ts
gitCompare(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<DiffResponse>
```

## gitDiffFile

Read one file's diff in full, including a large file the listing did not show

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/diff/file`

```ts
gitDiffFile(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitEventsList

A repository's git events

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/events`

```ts
gitEventsList(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitProtectionGet

Read a repository's branch protection

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/protection`

```ts
gitProtectionGet(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitProtectionPut

Set a repository's branch protection (policy class)

- Request: `PUT` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/protection`
- Needs an approval for agents: class `policy_change`

```ts
gitProtectionPut(args: { tenantId: string; projectId: string; repoId: string; body: PutProtectionRequest }, options?: CallOptions): Promise<BranchProtection>
```

## gitPullClose

Close a pull request

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls/{repo}/close`

```ts
gitPullClose(args: { tenantId: string; projectId: string; repoId: string; repo: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitPullFiles

Read a pull request's full diff

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls/{repo}/files`

```ts
gitPullFiles(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<PullFilesResponse>
```

## gitPullGet

Read one pull request

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls/{repo}`

```ts
gitPullGet(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<PullStatus>
```

## gitPullMerge

Merge a pull request

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls/{repo}/merge`

```ts
gitPullMerge(args: { tenantId: string; projectId: string; repoId: string; repo: string; body: MergeRequest }, options?: CallOptions): Promise<MergeResult>
```

## gitPullReview

Review a pull request

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls/{repo}/reviews`

```ts
gitPullReview(args: { tenantId: string; projectId: string; repoId: string; repo: string; body: SubmitReviewRequest }, options?: CallOptions): Promise<PullReview>
```

## gitPullsList

List pull requests

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls`

```ts
gitPullsList(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<PullListResponse>
```

## gitPullsOpen

Open a pull request

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/pulls`

```ts
gitPullsOpen(args: { tenantId: string; projectId: string; repoId: string; body: OpenPullRequest }, options?: CallOptions): Promise<PullRequest>
```

## gitPush

Push a commit to a branch through the API

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/push`

```ts
gitPush(args: { tenantId: string; projectId: string; repoId: string; body: PushRequest }, options?: CallOptions): Promise<PushResult>
```

## gitPushCheck

Check what a push would do without writing

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/push-check`

```ts
gitPushCheck(args: { tenantId: string; projectId: string; repoId: string; body: PushCheckRequest }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitRepoDelete

Delete a repository (deletion class)

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}`
- Needs an approval for agents: class `deletion`

```ts
gitRepoDelete(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<DeleteRepoResponse>
```

## gitRepoGet

Read one repository

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}`

```ts
gitRepoGet(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Repo>
```

## gitRepoIndexGet

Index status for a repository

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/index`

```ts
gitRepoIndexGet(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitRepoIndexRun

Queue an index run for a repository

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/index`

```ts
gitRepoIndexRun(args: { tenantId: string; projectId: string; repoId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitRepoMirror

Set the mirror direction and single writer for a repository (policy class)

- Request: `PUT` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/mirror`
- Needs an approval for agents: class `policy_change`

```ts
gitRepoMirror(args: { tenantId: string; projectId: string; repoId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitReposCapability

What the native git host offers on this deployment

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/capability`

```ts
gitReposCapability(args: { tenantId: string; projectId: string }, options?: CallOptions): Promise<NativeRepoCapability>
```

## gitReposCreate

Create a native repository

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos`

```ts
gitReposCreate(args: { tenantId: string; projectId: string; body: CreateRepoRequest }, options?: CallOptions): Promise<Repo>
```

## gitReposImport

Import a repository from another host into a native one

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/import`

```ts
gitReposImport(args: { tenantId: string; projectId: string; body: ImportRepoRequest }, options?: CallOptions): Promise<Repo>
```

## gitReposList

List a project's native repositories

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos`

```ts
gitReposList(args: { tenantId: string; projectId: string }, options?: CallOptions): Promise<RepoListResponse>
```

## gitRepoSync

Sync a mirrored repository now

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/sync`

```ts
gitRepoSync(args: { tenantId: string; projectId: string; repoId: string; body?: Record<string, unknown> }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitTokensList

List a repository's git tokens (never the secrets)

- Request: `GET` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/tokens`

```ts
gitTokensList(args: { tenantId: string; projectId: string; repoId: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

## gitTokensMint

Mint a git token; the secret is shown once

- Request: `POST` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/tokens`

```ts
gitTokensMint(args: { tenantId: string; projectId: string; repoId: string; body: MintGitTokenRequest }, options?: CallOptions): Promise<GitTokenGrant>
```

## gitTokensRevoke

Revoke a git token

- Request: `DELETE` on `/v1/tenants/{tenantId}/projects/{projectId}/repos/{repoId}/tokens/{repo}`

```ts
gitTokensRevoke(args: { tenantId: string; projectId: string; repoId: string; repo: string }, options?: CallOptions): Promise<Record<string, unknown>>
```

Source: https://docs.overlane.app/sdk/git/index.mdx
