glab(1)

🌸 NAME 🌸

glab-stack-reorder β€” Reorder a stack of diffs. (EXPERIMENTAL) β€” and yes bestie, this is from the glab(1) manual, so you're in the right place πŸ’–

✨ SYNOPSIS ✨

glab stack reorder [flags]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: glab stack reorder opens an editor with one diff per line, so you can literally rearrange them. Main character editor moment, no cap. πŸ’…

When you save and close the file, each diff's branch is rebased onto the branch of the diff now before it, and each moved diff's merge request is retargeted to match. Slay, but read this next part carefully: the rebased branches are not pushed automatically, so run glab stack sync to force-push them and replace the old commits on GitLab. Do not skip that part, bestie. 😭

If a rebase hits a conflict, resolve it, run git rebase --continue, and then run glab stack reorder --continue. To restore the original order instead, run glab stack reorder --abort. You got this. 🫢

🚨 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/.

πŸŽ€ OPTIONS πŸŽ€

  • --abort[=false] β€” Abort a reorder and restore original branch state. πŸ›‘
  • --continue[=false] β€” Continue a reorder after resolving conflicts. ▢️

πŸ‘‘ OPTIONS INHERITED FROM PARENT COMMANDS πŸ‘‘

  • -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. 🌈

πŸ“ EXAMPLE πŸ“

# 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

πŸ’œ SEE ALSO πŸ’œ

glab-stack(1) β€” the parent command is right there, go say hi πŸ‘‹


Auto generated by spf13/cobra, dated Nov 2026, and filed under glab(1) β€” mwah, bye bestie πŸ’‹βœ¨

πŸ“¦ where this page comes from