Jeff Cloud Systems Architect
1 min read

GIT CLI Create Merge Request

GIT CLI Create Merge Request

I was looking for a way to generate a git merge request via CLI, and found that GIT version 2.10 and higher finally support merge requests this way. Being a command line person, I hated doing a commit via cli then opening a web page to create a merge request, this seemed antiquated.

GIT push options are available with GIT 2.10 or newer

This example pushes changes to the branch Test to be merged with master

git push \
  -o merge_request.create \
  -o \
  -o merge_request.title="MR 101" \
  -o merge_request.description="Added new test feature 101"

Note: if you are running GIT 2.10 - 2.17 use --push-option instead of -o