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

[Home](./index.md) &gt; [git-documentdb](./git-documentdb.md) &gt; [Sync](./git-documentdb.sync.md) &gt; [init](./git-documentdb.sync.init.md)

## Sync.init() method

Create remote connection

<b>Signature:</b>

```typescript
init(repos: nodegit.Repository): Promise<SyncResult>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  repos | nodegit.Repository |  |

<b>Returns:</b>

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

## Exceptions

[RemoteRepositoryConnectError](./git-documentdb.remoterepositoryconnecterror.md)

[PushWorkerError](./git-documentdb.pushworkererror.md)

[NoMergeBaseFoundError](./git-documentdb.nomergebasefounderror.md)

[SyncWorkerError](./git-documentdb.syncworkererror.md)

## Remarks

Call init() once just after creating instance.

