Split a big change into dependent branches. git-queue rebases the whole queue on its base and opens one numbered PR per branch — each targeting the one below.
⚠️ Alpha software — git-queue rewrites branches and force-pushes (with lease) as part of normal operation. Run at your own risk.
git queue … dispatched by Git · MIT
Pick your platform below (we preselect the one you're on). Afterwards, git queue setup installs the man page, shell completion, and an optional git q alias.
Because the binary is named git-queue, Git runs git queue … for you via its standard subcommand mechanism. Then git queue setup installs the man page — afterwards both man git-queue and git queue --help work (Git routes --help to the man page; use git queue help for inline output).
Per-repo. Makes plain git commit/amend auto-requeue descendants.
$ git queue setup $ git queue setup --undo
Without hooks, use git queue commit / git queue amend explicitly.
commit/sync use git replay (≥ 2.44); amend/reword use git history (≥ 2.55). Other commands work on older git and tell you if a feature is missing.
Authenticated GitHub CLI, for submit/yank. Not needed for local-only queue operations.
// The man page is generated from the CLI definition (clap_mangen) so it never drifts — regenerate with git-queue man --dir <man1-dir>.
The core workflow. Build a queue branch-by-branch, submit numbered PRs, and keep everything rebased as trunk moves.
◉ ui #12 [OPEN] ◯ service #11 [OPEN] ◯ api #10 [OPEN] ┴ main (trunk)
◉ current branch · ◯ tracked · bottom merges into trunk first.
commit vs amend. Learn this pair and the rest follows.
Adds a new commit — new work — then requeues all descendants onto the new tip.
git replayFolds staged changes into the branch's tip commit and updates descendants — like commit --amend, queue-aware. The everyday tool for review feedback on a lower PR.
git history fixupWhen you change a branch that has descendants, use the git-queue command for it so the change propagates to every branch above (forks included). Running git rebase on a tracked branch detaches its children.
The full command set, grouped by task. Filter to find one fast.
Only needed when the auto-requeue hooks (git queue setup) aren't installed — with hooks, plain git commit / git commit --amend requeue the branches behind you automatically. (git queue amend also differs on conflict: it aborts atomically instead of persisting markers.)
// Help quirk: git queue <cmd> --help is intercepted by Git and opens the man page — use git queue help for inline CLI help.
Three worked, end-to-end sessions — each paired with the PR-body queue map git-queue generates.
Build a three-branch queue from trunk, describe the front PR, and open all three cross-linked PRs in one submit.
Task-focused recipes — the honest versions, including where a workflow takes more than one command.