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 eitherOWNER/REPOorGROUP/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
- arch rolling: glab 1.128.0-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms