glab(1) glab(1)

glab-stack-reorder - Reorder a stack of diffs. (EXPERIMENTAL)

glab stack reorder [flags]

Change the order of diffs in the current stack.

You choose the new order in your editor. After you save and close the file, each branch is then rebased onto its new parent so the local Git history matches the new order, and each diff is retargeted onto the branch before it to reflect the new order. Nothing is pushed. GitLab shows the old commits until you run glab stack sync to force-push the rebased branches.

If a rebase hits a conflict, resolve it, finish the rebase with git rebase --continue and then run glab stack reorder --continue. Alternatively, run glab stack reorder --abort to restore the original branch order. This feature is an experiment and is not ready for production use. It might be unstable or removed at any time. For more information, see https://docs.gitlab.com/policy/development_stages_support/.

--abort[=false] Abort a reorder and restore original branch state.

--continue[=false] Continue a reorder after resolving conflicts.

-h, --help[=false] Show help for this command.

-R, --repo="" Select another repository. You can use either OWNER/REPO or GROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted.

# Reorder the stack by choosing a new branch order in your editor
glab stack reorder
# Continue a reorder after resolving a conflict
glab stack reorder --continue
# Abort a reorder and restore the original branch order
glab stack reorder --abort

glab-stack(1)

Sep 2026 Auto generated by spf13/cobra