I use GitLab in my project. I'm exploring Merge Requests feature.
- I created a
topic_branch
frommaster
. - Made a bunch of commits on
topic_branch
. - Pushed
topic_branch
to remote. - Created a merge request on
master
to pull changes fromtopic_branch
. - On accept merge in Gitlab,
master
pulled all the commits and also created a merge commit which is horrible to see duplication of code.
I should have created a squash of commits on branch and then created merge request. But still master
would have two new commits, one from the branch and another one would be merge commit. I'm assuming, if I do this from command line i.e,
- checkout
master
- merge
topic_branch
intomaster
- commit / push
master
In this case, there would be only 1 commit onmaster
.
How to achieve this from GitLab ?