gitlab-create-merge-request

Installation
SKILL.md

Create Merge Request

Create a GitLab merge request for the current branch targeting main.

Steps

  1. Get the first commit message of the current branch (compared to main):

    git log main..HEAD --reverse --format="%s" | head -n 1
    
  2. Build the description in a file containing REAL line breaks. Never put \n or \\n inside a quoted -d argument: the shell passes those characters literally, so GitLab renders them as \n instead of Markdown line breaks.

    Use the file tool or a quoted heredoc to create the body, then pass its contents:

    glab mr create -t "<TITLE>" -d "$(cat /tmp/mr_body.md)" -b main -y
    
Installs
26
GitHub Stars
2
First Seen
Jan 24, 2026
gitlab-create-merge-request — kentoje/dotfiles