---
title: Setting Up a Merge Queue
description: Get your merge queue running in 5 minutes.
---

import { Image } from "astro:assets"
import queueCommandScreenshot from "../../images/merge-queue/setup/queue-command.png"
import queueStatusScreenshot from "../../images/merge-queue/setup/queue-status.png"
import Youtube from '../../../components/Youtube.astro'

Get your first PR merged through a queue in under 5 minutes. No complex setup
required.

:::note
  New to merge queues? Learn the fundamentals at the
  [Merge Queue Academy](https://merge-queue.academy/) before diving into setup.
:::

## Quick Start

### 1. Install Mergify

[Install the Mergify GitHub App](https://github.com/apps/mergify/installations/new)
on your repository. That's it — you now have a working merge queue.

### 2. Queue Your First PR

On any open pull request, comment:

```text
@mergifyio queue
```

<Image src={queueCommandScreenshot} alt="Mergify queue command" />

Mergify adds your PR to the queue, updates it against the latest main branch,
waits for CI to pass, and merges it automatically.

<Youtube video="2mVymDFMaMk" title="Add a PR to the merge queue"/>

### 3. Watch It Work

Open the [Mergify dashboard](https://dashboard.mergify.com) to see your PR
moving through the queue in real-time.

<Image src={queueStatusScreenshot} alt="Mergify Queue Status" />

**That's it.** Your merge queue is live.

## What You Get Immediately

With zero configuration, your queue already:

- **Updates PRs** against the latest main before merging
- **Runs your CI** on the updated code (not stale branches)
- **Merges automatically** when checks pass
- **Respects your GitHub branch protections** and rulesets

This alone prevents the classic problem: PRs that pass CI individually but
break main when merged together.

## Next Steps

Once your basic queue is running, explore these optimizations:

| Goal | Feature | Guide |
|------|---------|-------|
| Skip manual queueing | Auto-queue approved PRs | [Autoqueue](/merge-queue/rules#autoqueueing-pull-requests) |
| Merge faster | Test multiple PRs in parallel | [Parallel checks](/merge-queue/parallel-checks) |
| Save CI costs | Combine PRs into single CI runs | [Batches](/merge-queue/batches) |
| Prioritize urgent PRs | Jump the queue when needed | [Priority](/merge-queue/priority) |
| Run heavy tests only at merge | Split fast/slow CI checks | [Two-step CI](/merge-queue/two-step) |
| Monorepo optimization | Only test affected code | [Scopes](/merge-queue/scopes) |
