glab(1)

πŸ¦‹ glab-mr-checkout πŸ¦‹

hey bestie, welcome to the glab(1) page for glab-mr-checkout. this is the command that checks out an open merge request, and yes it’s giving main character energy. let’s get into it πŸ’…


✨ NAME ✨

glab-mr-checkout β€” check out an open merge request. periodt.

🌸 SYNOPSIS 🌸

glab mr checkout [ |  | ] [flags]

πŸ’– DESCRIPTION πŸ’–

okay so defaults to the currently checked-out branch. use --branch to override the local branch name used for the checkout. slay.

use --worktree to check out the merge request into a Git worktree at the given path. your current working directory and any work in progress stay untouched β€” no chaos, no lost edits. if you run the command again with the same path, it updates the existing worktree.

you can only check out a branch in one worktree at a time. if a branch is already checked out elsewhere, use --branch to check it out under a different name. important bestie.

to remove the worktree when you’re done, run git worktree remove <path>.

πŸŽ€ OPTIONS πŸŽ€

  • -b, --branch="" β€” checks out the merge request with name (the name you pass in). πŸ’–
  • -f, --force[=false] β€” resets the local branch to remote when they have diverged. ⚠️ it refuses if the working tree has changes that would be lost.
  • -u, --set-upstream-to="" β€” sets tracking of the checked-out branch to [REMOTE/]BRANCH.
  • --worktree="" β€” checks out the merge request into a Git worktree at (the path you pass in) instead of the current working directory. re-running updates an existing worktree at that path.

πŸ”₯ OPTIONS INHERITED FROM PARENT COMMANDS πŸ”₯

  • -h, --help[=false] β€” shows help for this command.
  • -R, --repo="" β€” selects another repository. you can use either OWNER/REPO or GROUP/NAMESPACE/REPO. the full URL or Git URL is also accepted.

πŸ‘‘ EXAMPLE πŸ‘‘

glab mr checkout 1
glab mr checkout branch
glab mr checkout 12 --branch todo-fix
glab mr checkout new-feature --set-upstream-to=upstream/main
glab mr checkout https://gitlab.com/gitlab-org/cli/-/merge_requests/1234

# Check out into a separate worktree
glab mr checkout 123 --worktree ../review-mr-123

# Uses the checked-out branch
glab mr checkout

🌈 SEE ALSO 🌈

go see glab-mr(1) πŸ‘€


Auto generated by spf13/cobra Β· Nov 2026 Β· glab(1) β€” bye bestie, go slay those MRs πŸ’…βœ¨

πŸ“¦ where this page comes from