---
url: https://relizy.dev/typedoc/functions/sync.md
---
[relizy](../index.md) / sync

# Function: sync()

> **sync**(`options?`): `Promise`<[`SyncResult`](../interfaces/SyncResult.md)>

Defined in: [packages/relizy/src/commands/sync.ts:90](https://github.com/LouisMazel/relizy/blob/b6643ceb9b0195df93c3f9f14cf5200f7ccc2322/packages/relizy/src/commands/sync.ts#L90)

Merge the released branch (the current one, or `from`) into the branches of
the rules of `sync` that match it (or `branches`) and push them, or open a
pull request into each one, as the `sync` step of `relizy release` does.
Throws a `SyncError` when a branch did not get it (a conflict, a refused
push), after the others are synced.

## Parameters

### options?

[`SyncOptions`](../interfaces/SyncOptions.md) = `{}`

## Returns

`Promise`<[`SyncResult`](../interfaces/SyncResult.md)>

## Example

```ts
const result = await sync({ branches: ['develop'] })
// { source: 'main', dryRun: false, branches: [{ branch: 'develop', mode: 'push', status: 'merged', commit: '...' }] }
```
