<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [git-documentdb](./git-documentdb.md) &gt; [GitDocumentDB](./git-documentdb.gitdocumentdb.md) &gt; [getByRevision](./git-documentdb.gitdocumentdb.getbyrevision.md)

## GitDocumentDB.getByRevision() method

Get a specific revision of a document

<b>Signature:</b>

```typescript
getByRevision(fileSHA: string): Promise<JsonDoc | undefined>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  fileSHA | string |  |

<b>Returns:</b>

Promise&lt;[JsonDoc](./git-documentdb.jsondoc.md) \| undefined&gt;

- JsonDoc if exists.

- undefined if not exists.

## Exceptions

[DatabaseClosingError](./git-documentdb.databaseclosingerror.md)

[RepositoryNotOpenError](./git-documentdb.repositorynotopenerror.md)

[UndefinedFileSHAError](./git-documentdb.undefinedfileshaerror.md)

[InvalidJsonObjectError](./git-documentdb.invalidjsonobjecterror.md)

