glab(1)
β¨ glab-mr-create β¨
Okay bestie, gather round because we're talking about glab mr create β the absolute queen of merge request creation. This is the command that takes your sad little local branch and turns it into a whole MR moment. π
πΈ SYNOPSIS πΈ
glab mr create [flags]
That's it. That's the whole vibe. Flags go here, magic happens. β¨
π DESCRIPTION π
So here's the tea: by default this command uses your current branch as the source branch. That's the main character energy right there β it just knows where you are and rolls with it. π«Ά
Want the title and description filled in automatically from your commit history? Slap on --fill and it's giving "I did the work, now the machine does the rest." Obsessed. π₯
Want it as a draft? --draft is your girl. Easy.
Now, --attach β okay this one's cute but listen: it uploads a file and references it at the end of the description. Repeat the flag for more than one file, or pass - to read the file from standard input. Files upload to the target project, so the references resolve even for a merge request from a fork. Teamwork, but make it seamless. π
β οΈ experiment alert! The --attach flag is an experiment. It might be unstable or removed at any time, and is not ready for production use. For more information, see https://docs.gitlab.com/policy/development_stages_support/. Don't say I didn't warn you, bestie. π
β οΈ another one! The --recover flag is also an experiment: it might be unstable or removed at any time, and is not ready for production use. For more information, see https://docs.gitlab.com/policy/development_stages_support/. Experimental girlies, this one's for you. π§
π¦ OPTIONS π¦
--allow-collaboration[=false]β Allow commits from other members. Set totrue/falseto override project defaults, or just omit it to use project settings. Lowkey letting the group chat help out.-a,--assignee=[]β Assign the merge request to people by their usernames. Multiple usernames can be comma-separated or specified by repeating the flag. Give your besties the credit. π--attach=[]β (EXPERIMENTAL) Upload a file and reference it at the end of the description. Use"-"to read the file from standard input. Repeat the flag to attach multiple files. Screenshots, logs, receipts β all of it. π--auto-merge[=false]β Set the merge request to merge when all merge checks pass. Set it and forget it, periodt.--copy-issue-labels[=false]β Copy labels from the issue to the merge request. Used with--related-issue. Your labels are coming with you, no cap.--create-source-branch[=false]β Create a source branch if it does not exist. Manifesting the branch into existence. β¨-d,--description=""β Supply a description for the merge request. Set it to"-"to open an editor. Write your essay, bestie.--description-file=""β Read the merge request description from a file. Use"-"to read from standard input. Because sometimes you draft it elsewhere first. π--draft[=false]β Mark the merge request as a draft. WIP energy, but official.-f,--fill[=false]β Do not prompt for title or description, and just use commit info. Pushes the branch unless--push=falseis set. Main character automation. π€--fill-commit-body[=false]β Fill the description with each commit body when there are multiple commits. Can only be used with--fill. Detail-oriented queen.-H,--head=""β Select another head repository using theOWNER/REPOorGROUP/NAMESPACE/REPOformat, the project ID, or the full URL. For when your code lives somewhere else. π-l,--label=[]β Add a label by name. Multiple labels can be comma-separated or specified by repeating the flag. Categorize your chaos, bestie.-m,--milestone=""β The global ID or title of a milestone to assign. Big picture vibes only.--no-editor[=false]β Don't open the editor to enter a description. Iftrue, uses prompt. Defaults tofalse. Some of us don't have time for the full editor experience. π--push[=false]β Push committed changes before creating the merge request. Make sure you have committed changes. Defaults totruewith--fill. Use--push=falseto skip the push. Know where your branches are, bestie. π--recover[=false]β Save the options to a file if the merge request creation fails. If the file exists, the options are loaded from the recovery file. (EXPERIMENTAL) A literal safety net. π-i,--related-issue=""β Create a merge request for an issue. If--titleis not provided, uses the issue title. Not me making connections. π₯--remove-source-branch[=false]β Remove the source branch on merge. Set totrue/falseto override project defaults, or omit to use project settings. Clean up after yourself, icon behavior.--reviewer=[]β Request review from users by their usernames. Multiple usernames can be comma-separated or specified by repeating the flag. Get your eyeballs on it. π--signoff[=false]β Append a DCO signoff to the merge request description. Legally official and cute about it.-s,--source-branch=""β Create a merge request from this branch. Default is the current branch. Lowkey obvious, highkey useful.--squash-before-merge[=false]β Squash commits into a single commit when merging. Set totrue/falseto override project defaults, or omit to use project settings. One commit, one vibe.-b,--target-branch=""β The target or base branch into which you want your code merged into. Where the story ends. π--template=""β Template to pre-populate the description. A name is looked up in'.gitlab/merge_request_templates/'of the local repository, and the'.md'extension is optional. A value that is absolute or contains a path separator is read as a file path, for example'~/templates/feature.md'. I love a template moment. π-t,--title=""β Supply a title for the merge request. Make it iconic. π-w,--web[=false]β Continue merge request creation in a browser. For the visual learners.--wip[=false]β Mark the merge request as a draft. Alternative to--draft. Same energy, different spelling.-y,--yes[=false]β Skip the submission confirmation prompt. Use--fillto skip all optional prompts. No hesitation, just vibes. β¨
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
-h,--help[=false]β Show help for this command. When in doubt, ask for help. π«Ά-R,--repo=""β Select another repository. You can use eitherOWNER/REPOorGROUP/NAMESPACE/REPO. The full URL or Git URL is also accepted. Explore elsewhere, bestie.
π EXAMPLE π
# Create a merge request interactively from the current branch
glab mr new
# Assign a user and set a title without prompting for description
glab mr create -a username -t "fix annoying bug"
# Fill title and description from commits, mark as draft, add a label
glab mr create -f --draft --label RFC
# Fill from commits and preview the compare page in the browser
glab mr create --fill --web
# Fill from commits, expand each commit body into the description
glab mr create --fill --fill-commit-body --yes
# Fill from commits without pushing, for a branch already on the remote
glab mr create --fill --push=false --yes
# Use a merge request template for the description
glab mr create -t "Fix login bug" --template bug_fix
glab mr create -t "Security patch" --template security_fix.md --yes
# Use a template file from outside the repository
glab mr create -t "Fix login bug" --template ~/team-templates/bug_fix.md
# Create against another project without a local clone. All inputs must be passed as flags; no --push, --fill, or --template.
glab mr create --repo group/project --source-branch feature-branch --target-branch main --title "Add feature" --description "Details..." --yes
# Create a fork merge request from your fork into the upstream project, without a local clone.
glab mr create --repo upstream/project --head your-namespace/project --source-branch feature-branch --target-branch main --title "Add feature" --description "Details..." --yes
# Read the description from a file
glab mr create -t "Fix login bug" --description-file description.md
# Read the description from standard input
cat description.md | glab mr create -t "Fix login bug" --description-file -
# Attach a screenshot to the description
glab mr create -t "Fix login bug" -d "Before and after:" --attach ./before.png --attach ./after.png
That's the whole mood board, bestie. Memorize it. π«Ά
π SEE ALSO π
glab-mr(1) β go read it, iykyk. β¨
Anyways, this page was auto generated by spf13/cobra back in Nov 2026, and it's serving glab(1) manual page realness. Stay slay, stay committed (literally), and go make some iconic merge requests. π¦ππ₯
π¦ 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