File: create.md

package info (click to toggle)
glab 1.53.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 20,936 kB
  • sloc: sh: 295; makefile: 153; perl: 99; ruby: 68; javascript: 67
file content (72 lines) | stat: -rw-r--r-- 3,398 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
stage: Create
group: Code Review
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

<!--
This documentation is auto generated by a script.
Please do not edit this file directly. Run `make gen-docs` instead.
-->

# `glab mr create`

Create a new merge request.

```plaintext
glab mr create [flags]
```

## Aliases

```plaintext
new
```

## Examples

```plaintext
glab mr new
glab mr create -a username -t "fix annoying bug"
glab mr create -f --draft --label RFC
glab mr create --fill --web
glab mr create --fill --fill-commit-body --yes

```

## Options

```plaintext
      --allow-collaboration    Allow commits from other members.
  -a, --assignee usernames     Assign merge request to people by their usernames.
      --copy-issue-labels      Copy labels from issue to the merge request. Used with --related-issue.
      --create-source-branch   Create a source branch if it does not exist.
  -d, --description string     Supply a description for the merge request.
      --draft                  Mark merge request as a draft.
  -f, --fill push              Do not prompt for title or description, and just use commit info. Sets push to `true`, and pushes the branch.
      --fill-commit-body       Fill description with each commit body when multiple commits. Can only be used with --fill.
  -H, --head OWNER/REPO        Select another head repository using the OWNER/REPO or `GROUP/NAMESPACE/REPO` format, the project ID, or the full URL.
  -l, --label strings          Add label by name. Multiple labels should be comma-separated.
  -m, --milestone string       The global ID or title of a milestone to assign.
      --no-editor              Don't open editor to enter a description. If true, uses prompt. Defaults to false.
      --push                   Push committed changes after creating merge request. Make sure you have committed changes.
      --recover                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.)
  -i, --related-issue string   Create a merge request for an issue. If --title is not provided, uses the issue title.
      --remove-source-branch   Remove source branch on merge.
      --reviewer usernames     Request review from users by their usernames.
      --signoff                Append a DCO signoff to the merge request description.
  -s, --source-branch string   Create a merge request from this branch. Default is the current branch.
      --squash-before-merge    Squash commits into a single commit when merging.
  -b, --target-branch string   The target or base branch into which you want your code merged into.
  -t, --title string           Supply a title for the merge request.
  -w, --web                    Continue merge request creation in a browser.
      --wip                    Mark merge request as a draft. Alternative to --draft.
  -y, --yes                    Skip submission confirmation prompt. Use --fill to skip all optional prompts.
```

## Options inherited from parent commands

```plaintext
      --help              Show help for this command.
  -R, --repo OWNER/REPO   Select another repository. Can use either OWNER/REPO or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.
```