title: Gitlab merge "merge request" with commit
body: <p>I believe it's stupid question but I don't understand how should I use <a href="https://docs.gitlab.com/ee/user/project/merge_requests/#set-merge-when-pipeline-succeeds-using-git-push-options" rel="nofollow noreferrer">gitlab merge request push options</a></p>
  <p>I have this scenario:</p>
  <ul>
  <li>I have open merge request from develop to master</li>
  <li>I make some changes on develop branch and push them to gitlab server with the proper option</li>
  </ul>
  <pre><code>git add .
  git commit -m 'finish mr'
  git push origin develop -o merge_request.merge_when_pipeline_succeeds
  </code></pre>
  <ul>
  <li>I expect that after pipelines of this commit will succeed the MR be merged but instead I get this message on gitlab MR page:</li>
  </ul>
  <pre><code>@user aborted the automatic merge because source branch was updated just now
  @user added 1 commit just now
  
      8efdbde1 - finish mr
  </code></pre>
  <p>So it seems that the push will set MR to allow merge after succeed and immediately abort it because of commit from same push. I also tried <a href="https://docs.gitlab.com/ee/user/project/quick_actions.html" rel="nofollow noreferrer">quick actions</a> with /merge but same result. I know there is gitlab API, but I can't use it. Does anyone know what I am doing wrong?</p>
  <p><strong>EDIT:</strong></p>
  <p>as accepted answer suggested adding target branch helped, but I also needed to add <strong>ci.skip</strong>:</p>
  <pre><code>git push origin $CI_COMMIT_REF_NAME \
  -o ci.skip \
  -o merge_request.target=&quot;$MASTER_BRANCH_NAME&quot; \
  -o merge_request.merge_when_pipeline_succeeds \
  -o merge_request.create
  </code></pre>