I use GitLab in my project. I'm exploring Merge Requests feature.
- I created a
topic_branch
from master
.
- Made a bunch of commits on
topic_branch
.
- Pushed
topic_branch
to remote.
- Created a merge request on
master
to pull changes from topic_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
into master
- commit / push
master
In this case, there would be only 1 commit on master
.
How to achieve this from GitLab ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…