diff --git a/pages/common/glab-mr-create.md b/pages/common/glab-mr-create.md new file mode 100644 index 0000000000..d6e52bf1d7 --- /dev/null +++ b/pages/common/glab-mr-create.md @@ -0,0 +1,24 @@ +# glab mr create + +> Manage GitLab merge requests from the command-line. +> More information: . + +- Interactively create a merge request: + +`glab mr create` + +- Create a merge request, determining the title and description from the commit messages of the current branch: + +`glab mr create --fill` + +- Create a draft merge request: + +`glab mr create --draft` + +- Create a merge request specifying the target branch, title, and description: + +`glab mr create --target-branch {{target_branch}} --title "{{title}}" --description "{{description}}"` + +- Start opening a merge request in the default web browser: + +`glab mr create --web` diff --git a/pages/common/glab-mr-merge.md b/pages/common/glab-mr-merge.md new file mode 100644 index 0000000000..d7cc713cfd --- /dev/null +++ b/pages/common/glab-mr-merge.md @@ -0,0 +1,24 @@ +# glab mr merge + +> Merge GitLab merge requests. +> More information: . + +- Merge the merge request associated with the current branch interactively: + +`glab mr merge` + +- Merge the specified merge request, interactively: + +`glab mr merge {{mr_number}}` + +- Merge the merge request, removing the branch on both the local and the remote: + +`glab mr merge --remove-source-branch` + +- Squash the current merge request into one commit with the message body and merge: + +`glab mr merge --squash --message="{{commit_message_body}}"` + +- Display help: + +`glab mr merge --help` diff --git a/pages/common/glab-mr.md b/pages/common/glab-mr.md new file mode 100644 index 0000000000..9f1ab66c39 --- /dev/null +++ b/pages/common/glab-mr.md @@ -0,0 +1,33 @@ +# glab mr + +> Manage GitLab merge requests from the command-line. +> Some subcommands such as `glab mr create` have their own usage documentation. +> More information: . + +- Create a merge request: + +`glab mr create` + +- Check out a merge request locally: + +`glab mr checkout {{mr_number}}` + +- View the changes made in the merge request: + +`glab mr diff` + +- Approve the merge request for the current branch: + +`glab mr approve` + +- Merge the merge request associated with the current branch interactively: + +`glab mr merge` + +- Edit a merge request interactively: + +`glab mr update` + +- Edit the target branch of a merge request: + +`glab mr update --target-branch {{branch_name}}`