The merge queue
How Merget forms a semantic merge queue from dependencies across pull requests, gives independent work priority, and determines when a change can land.
On this page
Open Merge order in a repository's queue to see which pull request is up next, what will be ahead of yours, and which changes can proceed independently. The order and each pull request's readiness are shown separately.

Read merge order from the list; use the map to inspect relationships.
What to look for
- Position is shown beside every pull request. Readiness appears beneath its title.
- Switch the left pane between Merge order and Git tree. Select a pull request to open its details.
How pull requests join
Open, non-draft pull requests targeting the configured branch join automatically. A pull request stacked on a queued parent can join too. No label, comment or enqueue command is needed. Drafts and other excluded pull requests appear separately below the merge order, with their reason and next action; see Pull requests outside the queue.
Use Target branch in repository settings to change the destination; leaving it empty uses the repository's default branch. See Stacked pull requests.
How pull requests leave
A pull request leaves when it merges, closes, becomes a draft or changes its base outside the queue. A stack whose parent leaves can also leave with it. Merget updates the order as GitHub changes arrive.
How Merget forms a semantic merge queue
Merget analyzes the open pull requests in the queue in parallel. Using a code graph built by static analysis, it traces dependencies across branches, including function calls and the flow of values between changed code. It uses those relationships to identify independent changes and groups of related pull requests, then computes their merge order automatically.
In a fresh plan, independent pull requests go first. Smaller groups of related changes follow, with the pull requests that interact with fewer others first within each group. Otherwise equal changes are ordered by when they were opened. A stacked pull request follows its parent in their shared queue. When Merget replans, it can keep work already being prepared or batched in place so its results stay valid.
For example, a setup-guide fix can land ahead of an earlier billing change while the team prepares the billing function and its callers together. Two changes can be related and both be correct. Their tests and reviews still decide readiness under your repository's policy.
Select a pull request and expand Queue position & history to see why it holds its place. Clusters on the map show relationships. Read the numbered positions or Merge order for the actual sequence, since members of a cluster can land apart.

Select a pull request to see why it is ready, waiting or blocked.
What to look for
- The colored readiness panel gives the immediate reason; this example has a failed required check.
- Checks and reviews on this head shows the current commit’s gates. Needs you gathers work that requires attention.
- Preparation details and Queue position & history expand below the relationship summary.
Move a pull request to the front
When one pull request cannot wait its turn, such as a hotfix, a person can move it to the front. Select it, choose Move to front in its details, say why it goes first, and confirm. Once it is ready, Merget plans it ahead of every pull request not yet in a batch: behind the batches Merget has already cut, and behind the pull requests a standing merge request still has to merge. It is tested in a batch of its own as soon as a CI slot frees, and lands right after the batches ahead of it; alone at the front of an Autonomous queue with nothing in flight, it is no batch, and merges on its own checks as soon as it is placed.
Moving a pull request changes the order only. Its preparation, required checks and reviews apply as they do anywhere in the queue, and Merge anyway stays a separate action. It is offered in Queue and Autonomous modes, to people with the access the repository's settings ask for: Maintain on GitHub by default.
Ready first. A pull request that is not ready yet keeps its place and reads Moves to the front once ready, with what it waits for. It moves to the front the first time Merget finds it ready, and goes back in order if it is not ready within the repository's limit, a day by default.
First come, first served. Several pull requests at the front stand in the order they were moved, up to the repository's limit, two by default.
Stacks move together. Moving a stacked pull request brings the pull requests it is stacked on to the front with it.
It costs re-preparation. The pull requests it passes are prepared again, because their base changes. The confirmation names them before you confirm.
It stays until it ends. It stays at the front until it merges, until someone puts it back in order with Back in order or holds it back, or until it leaves the queue. New commits keep it there: it moves to the front again once they are ready. Once it is in a batch, or covered by a person's standing merge request, Back in order ends the move but leaves it there: it still lands with that batch, or merges under that request, and only holding it back takes it out.
In Queue mode it still needs a merge request: tick Also merge when its CI passes in the confirmation, or use Merge N PRs once it is offered. Where the repository allows it, Urgent does not wait for the batches still being composed or in CI ahead of it. See Move a pull request to the front for what each choice costs, and Queue behavior for who may do it.
The head of the queue
The first pull request is the head. It is the normal next candidate for merging. Next to merge means it is ready; Suggested next describes its position when it is not ready or the repository is in Advisory mode.
By default, a waiting head holds later changes. A ready batch can cover several changes, and an enabled passing lane can let eligible independent changes proceed ahead of a head that cannot currently land.
See Batching and Unblock a pull request.
When the first pull request is not ready
Three options can let other work move:
Merge what's ready moves changes that cannot land behind eligible ready work, then prepares the changed order again. The confirmation names what moves and what the request will merge; clicking it does not make an unchecked change land immediately.
Passing lane keeps the first pull request in place while independent ready changes are tested and merged ahead of it. Enable it under Configure › Advanced › Queue behavior › Passing lane.
Move to front puts one pull request you choose ahead of every pull request not yet in a batch, the first one included, once it is ready. See Move a pull request to the front.
Passing lanes
A passing lane is for a pull request known to be unable to land, such as one missing a review or needing a conflict fix. Merget does not open it merely because preparation is still running. After (seconds) not ready controls the wait, and Up to (pull requests) limits its size.
Which pull requests pass
Changes in a passing lane must be prepared, satisfy their own checks and reviews, and have no detected interaction with the work they pass. Fork pull requests are excluded, and fork and bot pull requests are prepared only after a maintainer approves the commit; see Pull requests from forks and bots. A stacked change can pass only with the parent it needs.
The queue marks the waiting head queue moving past it, marks lane members passing lane, and reports Lane CI in Queue controls › Plan status. Open the Queue status control in the header to read it. The map and selected pull request explain which change they move ahead of.
How the lane merges
In Autonomous mode, a ready lane can merge automatically. In Queue mode, use the offered passing-lane merge action and review its members before confirming, or merge its members in GitHub in the stated order. The lane's request is its own: a standing Merge N PRs request keeps standing, and when the lane merges pull requests that request covers, they count as merged and the rest lands after the lane with no second click. Holding back a pull request in the lane withdraws the lane's action: the lane merges whole or not at all, so Merget tests it again without that pull request.
The passing lane has its own progress and cancellation. Cancelling its request does not cancel a separate sequence request. A failed or refused lane remains explained in the queue.
Once lane members land, the waiting head is prepared again. If that head becomes ready while the lane is still being tested, the queue can close the lane and proceed with the head. Read the current plan rather than relying on an earlier screenshot.
Preparing ahead: the predicted base
In Queue and Autonomous modes, Merget prepares a pull request against its predicted base: the code your pull request will meet when it lands (the target branch plus the pull requests ahead of it). Parts of the dashboard call it the predicted trunk.
A fix needed only after another queued change lands stays with the queue's combined result until that dependency lands. See Conflict resolution.
Ready in sequence
Ready in sequence means a change is prepared to follow the changes ahead of it and its other checks and reviews pass. It does not mean it can merge ahead of them, or that CI tested the full combination.
A batch supplies the CI evidence for a combination. In Queue mode, an offered Merge N PRs action can cover the ready sequence, including members that still need their own batch CI. The confirmation explains what lands now and what waits.
When the queue re-plans
The plan follows your repository: new commits, merges, check and review results and setting changes can change the order. You don't have to trigger it. The dashboard updates while its tab is visible.
Stale plans
Stale plan, Merget is re-planning this queue or This order is out of date means the displayed order may change. It usually resolves automatically. Needs re-check on one pull request means its earlier preparation no longer applies to the current code.
In Queue mode a stale plan can still offer Merge N PRs: while Merget plans again after a pull request opens, or another one is pushed, closed without merging or merged into a branch other than the target, the action covers the batch at the head, green or still in CI, and the batches tested on top of it. While Merget updates a plan after a merge into the target branch, a push to it or a change to the repository's settings, or after a push to a pull request in that batch itself, it takes no merge request, and during any update it takes no Merge the passing lane, Land it now or Land the passing lane now; the header then offers none of them and says why where the action was, for example "Merget is updating the plan, so Merge is not offered until the new order is ready." The action returns once the new plan is published, if what it would merge still stands. See Merge this sequence in Queue mode.
Merges out of order
Unless GitHub protection prevents it, a person can merge outside the planned order. Merget records the merge and plans from the new target. Affected preparations are checked again: re-validated rather than prepared again, as described next.
See Branch protection if manual merges should follow the queue too.
When the target moves under the queue
A hotfix, an out-of-order merge or another update to the target branch can make earlier preparation out of date. Merget checks the remaining changes against the new target before they land. To land a hotfix through the queue instead, ahead of the rest, move it to the front. The queue can show Re-validating, followed by Preparing batch and Testing on CI.
Open Preparation details on the pull request to read the current status, shown as Preparation: Re-validating while this check is in progress. Its Merget check can say Action required while re-validation is in progress; this is a waiting state, not a request to make a code change.
If Merget needs to prepare the pull request again, it reads Preparing instead. Follow Needs you only when the queue asks for a fix or another action. Activity records Revalidated or Revalidation declined, and the latest run explains the result. See When the target moves under a batch.
When main is red
Verify main after every merge tracks whether target-branch checks pass. In Queue and Autonomous modes it is enabled by default. When the target is red, the queue reports the failing checks and can identify the change suspected of introducing the failure.
Needs you identifies work to fix or revert. Merget can judge later batches using the other required checks rather than blaming them for an existing target failure. The queue explicitly states which failures are being set aside; they are not counted as passing. GitHub branch rules still apply to the chosen landing path.
The verified branch
Enable Publish a verified branch to maintain merget/verified/<target>, such as merget/verified/main, at the newest target commit Merget knows is green.
It follows a green target and stays at the last verified commit while checks are incomplete or failing. It advances again after a fix is verified. If target history is rewritten, it stays put unless Reset it after a history rewrite is enabled.
Deploy workflows can follow merget/verified/**. Keep CI's queue-branch trigger specific to merget/queue/** so publishing the verified branch does not needlessly rerun queue checks.
Turning verification off
Turning off Verify main after every merge stops target verification and its related notices. An existing verified branch remains where it was. See Branch health and deployment.
In each mode
Advisory suggests an order and leaves all code changes and merges to you (it may still rename a required sema check). Queue prepares changes and waits for your merge action. Autonomous also starts ready merges under your configured policy.
See Automation modes and Repository queue for the controls you use day to day.