> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# bookmarks.merge()

> Merge one bookmark into another.

Merge `source` into `target`. The target bookmark advances to the merge result.

**Required scope: `write`**

```python theme={null}
result = await mesa.bookmarks.merge(
    repo="app",
    source="feature-x",
    target="main",
    authors=[{"name": "Docs Bot", "email": "docs@example.com"}],
    delete_source=True,
)
print(result.merge_type, result.change_id)
```

Resolve conflicts on retry:

```python theme={null}
from mesa_sdk import WholeFileResolution

result = await mesa.bookmarks.merge(
    repo="app",
    source="feature-x",
    target="main",
    authors=[{"name": "Docs Bot", "email": "docs@example.com"}],
    resolutions=[WholeFileResolution(path="README.md", take="source")],
)
```

## Options

**repo** `str` *required*

Repository name.

**source** `str` *required*

Source bookmark with changes to merge.

**target** `str` *required*

Target bookmark to advance.

**delete\_source** `bool | None`

Delete the source bookmark after a successful merge.

**allow\_conflicted** `bool | None`

When `True`, accept a merge that still contains textual conflicts. When omitted or `False`, conflicted merges fail with `ConflictError`.

**resolutions** `list[Resolution] | None`

Whole-file or per-hunk conflict resolutions applied before conflict detection.

**authors** `list[Author] | None`

Commit authors, in order, with at least one entry. Private-key clients set this.

## Response

**merge\_type** `'merge_commit' | 'no_op'`

Type of merge that was performed.

**is\_conflicted** `bool`

Whether the resulting merge change still contains unresolved conflicts.

**commit\_oid** `str`

Commit OID the target bookmark now points to.

**change\_id** `str`

Change ID the target bookmark points to after the merge.

**target** `str`

Bookmark that was merged into.

**source** `str`

Bookmark that was merged from.

**source\_deleted** `bool`

Whether the source bookmark was deleted after the merge.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.