# How to use merge rules

[Merge rules](/docs/collaboration/merge-rules.md) give you more control over how change requests are reviewed and merged, helping teams maintain quality and consistency.

This video and guide will take you through merge rules in GitBook, covering:

* Where to set up merge rules to control who has access to push changes live
* Configuring specific rules, like requiring reviews
* and more!

{% embed url="<https://www.youtube.com/watch?v=-mNqXD2gAYw>" %}

### What are merge rules?

Merge rules restrict when a change request can be merged. They make sure specific conditions are met before changes go live.

You can apply merge rules at the **organization level** or per **space**.

### Where to manage merge rules

There are a few places you can manage merge rules for your organization. All spaces within an organization will inherit the organization’s rules, unless updated and specified in a space.

#### Organization-wide

Head to your organization’s settings, and then to merge rules. From here you can set rules that will apply to all spaces in the organization.

#### Per-space

When working in a space, to update it’s merge rules, click the 3 dots next to to the space name, and select “merge rules”.

If you’re working in a space **inside of a change request**, head to the overview tab of your change request, and click the settings icon in the merge rules section to configure your rules.

### Configure merge requirements

When you create or edit a merge rule, you can require things like:

* At least one **review** before merging
* Reviews from **specific team members**
* The [change request](/docs/collaboration/change-requests.md) to be **up to date**
* Required **metadata** (like a subject and description)

Read our [full merge rules docs](/docs/collaboration/merge-rules.md) to find out more about merge requirements.

### Enforce quality and consistency

Merge rules help keep change requests reviewed, complete, and current. And that helps you keep documentation quality high and reduces mistakes going live.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.com/docs/guides/editing-and-publishing-documentation/how-to-use-merge-rules.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
