How to create a merge request on push to GitLab

Categories:

New branch

Push new branch and set upstream:

1git push -o merge_request.create -o merge_request.target=master -o merge_request.assign="$gitlab_username" -u origin "$branch"

Existing branch

Push existing branch and update merge request:

1git push -o merge_request.create -o merge_request.target=master -o merge_request.assign="$gitlab_username"

See Also