<!-- 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; [getDocHistory](./git-documentdb.gitdocumentdb.getdochistory.md)

## GitDocumentDB.getDocHistory() method

Get revision history of a file from new to old

<b>Signature:</b>

```typescript
getDocHistory(docID: string): Promise<string[]>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  docID | string |  |

<b>Returns:</b>

Promise&lt;string\[\]&gt;

Array of fileSHA (NOTE: getDocHistory returns empty array if document does not exist in history.)

## Exceptions

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

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

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

[CannotGetEntryError](./git-documentdb.cannotgetentryerror.md)

