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 to true/false to 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=false is 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 the OWNER/REPO or GROUP/NAMESPACE/REPO format, 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. If true, uses prompt. Defaults to false. 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 to true with --fill. Use --push=false to 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 --title is not provided, uses the issue title. Not me making connections. πŸ”₯
  • --remove-source-branch[=false] β€” Remove the source branch on merge. Set to true/false to 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 to true/false to 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 --fill to 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 either OWNER/REPO or GROUP/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