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

## GitDocumentDB.create() method

Create and open a repository

<b>Signature:</b>

```typescript
create(remoteOptions?: RemoteOptions): Promise<DatabaseInfo>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  remoteOptions | [RemoteOptions](./git-documentdb.remoteoptions.md) |  |

<b>Returns:</b>

Promise&lt;[DatabaseInfo](./git-documentdb.databaseinfo.md)<!-- -->&gt;

Database information

## Exceptions

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

[DatabaseExistsError](./git-documentdb.databaseexistserror.md)

[WorkingDirectoryExistsError](./git-documentdb.workingdirectoryexistserror.md)

[CannotCreateDirectoryError](./git-documentdb.cannotcreatedirectoryerror.md)

[CannotConnectError](./git-documentdb.cannotconnecterror.md)

## Remarks

- If localDir does not exist, create it.

- create() also opens the repository. create() followed by open() has no effect.

