I am experiencing an issue while merging branches in GitLab. I want to merge changes from the release-8 branch into dev, but after completing the merge, the commit history shows that changes from dev were also merged into release-8.
Scenario:
devcontains commitsA--B--Crelease-8branch is made frommaster- commits
D--Einrelease-8 fix/feature-Bbranch is made frommaster- commits
Finfix/feature-Band merge it todev(sodevshould beA--B--C--F) - merge from
release-8intodevwith some conflict and resolving it in GitLab UI - However, after completing the merge, the commit history shows "Merge branch 'dev' into release-8" (even though I can manually edit the commit message, it confuses me and makes me double check whether I merge from
release-8todevand not the other way around).
Commits Graph:
What I expect is that dev contains commits A--B--C--F--D--E and 'release-8' still D--E. But what I got is that release-8 contains F too.
- Is there something I did wrong with the merge, or is it just a normal git workflow?
- How do I maintain so that my branch for features (
release-8) is not merged with any branch from fix (fix/feature-B) or contains any changes from not related commit?
The merge that includes F is only happening when there is a conflict on merge, and GitLab UI somehow name the commit message to be "Merge branch 'dev' into release-8" so maybe there is something I need to figure out.
Edit:
What I expect is something like what it looks on the commit graph I provide. But what is actually happening is, because of my merge (release-8 into dev) is having a conflict, F is commited to release-8 first, and then merged to dev. So there is unwanted and unrelated F commits in branch release-8.

(A)notation? What's different betweenAand(A)? The output ofgit log --graph --oneline --decorate --simplify-by-decoration master dev release-8 fix/feature-Bmight be clearer to read.