<!-- 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; [tryPush](./git-documentdb.sync.trypush.md)

## Sync.tryPush() method

Try to push with retries

<b>Signature:</b>

```typescript
tryPush(options?: {
        onlyPush: boolean;
    }): Promise<SyncResultPush | SyncResultCancel>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  options | { onlyPush: boolean; } |  |

<b>Returns:</b>

Promise&lt;[SyncResultPush](./git-documentdb.syncresultpush.md) \| [SyncResultCancel](./git-documentdb.syncresultcancel.md)<!-- -->&gt;

## Exceptions

[PushNotAllowedError](./git-documentdb.pushnotallowederror.md) (from this and enqueuePushTask)

[PushWorkerError](./git-documentdb.pushworkererror.md) (from this and enqueuePushTask)

[UnfetchedCommitExistsError](./git-documentdb.unfetchedcommitexistserror.md) (from this and enqueuePushTask)

