MergeRequest:The source branch and the target branch will reverse when there is a conflict?!

I was using Gitlab ce 9.2.2 and 9.2.7 on CentOS 7,mostly testing for now. I’m here looking for some help on Merge Request. I would greatly appreciate it if you kindly give me some help with this.
Merge request works well when there is no conflict or it can merge automatically. But the source branch and the target branch will reverse when there is a conflict?!
e.g.:I create a new merge request from test_webroot_2017 to master with a conflict, but when I resolve conflicts, the commit message is reversed: Merge branch ‘master’ into ‘test_webroot_2017’. And the result is merge master into test_webroot_2017 when I check the commit history.
Anyone encountered this problem?
What’s wrong with my operation? My process is like this. Make a new branch test_webroot_2017 from master, and modify different contents on the same place of the same file, and create a merge request from test_webroot_2017 to master, and solve the conflicts.
Attached were the proccess of merge request, I holp it can explain the problem better.Thanks very much!

That’s how that feature works. If you have merge conflicts you can basically do 2 things:

  • rebase the branch on master
  • merge master into the branch

In the merge conflict resolution feature, the second option is used.


 Thanks very much for your quickly reply.

** I’m still a little confused about how it works.I used some time to learn about git rebase again. **
** My requirment is I need to merge develop branch into master, not merge master into develop branch,e.g. before release after the test.**

  1.   When the developer finished some functions on develop branch and passed the test, they **rebase the develop branch onto master** e.g. in Eclipse, and solve the conflicts on the develop branch.
  2.    The developer create a merge request from develop branch into master in Gitlab.
  3.    The Master dealwith the merge request,it's fast-forward merge because there will have no conflicts.
  4.    The merge request mostly used for protect branch like master,and the developer need to solve the conflicts before create a merge request.
     Please tell me whether it is right or not, Thanks.