Do not push your branch before the following commands. If you push your branch before it will not work. Git response is going to be
Everything up-to-dateand the merge request will not be created.
my-branchto the remote repository and create a new merge request from our branch to the
mainbranch of the project.
git push -o merge_request.create origin my-branch
my-branchto the remote repository and the target branch
workwith the merge request title
<title>and a merge request description
<description>, setting the merge request to remove the source branch when it’s merged:
git push \ -o merge_request.create \ -o merge_request.target=work \ -o merge_request.title="<title>" \ -o merge_request.description="<description>" \ origin my-branch
- 1 GitLab Documentation