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

## GitDocumentDB.collection() method

Get a collection

<b>Signature:</b>

```typescript
collection(collectionPath: CollectionPath): Collection;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  collectionPath | [CollectionPath](./git-documentdb.collectionpath.md) | path from localDir. Sub-directories are also permitted. e.g. 'pages', 'pages/works'. |

<b>Returns:</b>

[Collection](./git-documentdb.collection.md)

## Remarks

- Notice that this function does not make a sub-directory under the working directory.

