2

I did web search on the topic and found and have read:

How to prevent Gitlab from creating extra merge commit on branch merge

What is the purpose of a separate merge commit in git?

So I see there maybe project setup to do fast-forward, but from other post I see separate merge commits serve useful purpose.

A, the problem: I'm working on (initial) copy of master branch (dev). I do commit in dev then merge to master via GitLab web GUI. I started to do so recently and just noted on such merge that GitLab informs me that my dev is behind ("Request to merge dev into master / The source branch is 3 commits behind the target branch"). I took me a while (cause clicking on message gives full list of commits, not list of those 3) to realise those are my merge commits. AFAIK more standard way to use git is to branch, commit, merge and delete dev, but if I want to continue to use one branch, can I somehow quickly setup GitLab to ignore merge commits when comparing branches or quickly check in GitLab GUI that those differences are merge commits? Or else what can you advice except deleting dev every time?

ADDED: Actually I have a related question (maybe because I have not used git log a lot (yet)). In docs there is a picture:

                   D---E-------F
                  /     \       \
                 B---C---G---H---I---J
                /                     \
               A-------K---------------L--M

So as I see it at point J middle brach merged to lower, but I do not see H, I etc on lower branch, but in GUI in GitLab for master I see both my merge commits and those commits I made on dev which were merged. Why is that?

Alex Martian
  • 3,423
  • 7
  • 36
  • 71

0 Answers0