I have a problem, that confuses me quite much, because I thought that should work without problems.
-
I have a main and a develop branch and only develop can merge into main, all other branches merge into develop, so a quite straight forward setup.
-
At the beginning main and develop are the same, no commits before or the other one.
-
I open a new branch from develop (e.g. feature_42). When I start, it is obviously at the same level like main and develop.
-
I go with GitLab Merge Request from feature_42 into develop, which works fine. After the merge, the develop branch is 2 ahead and after an automated version update on the develop branch, it is 3 commits ahead of main. (Somehow a merge requests generates 2 commits…?)
-
I open a merge request from develop to main, which also works fine…but only the first time!!
- After the merge from develop into main, develop is 2 commits behind main, which now is a serious problem
Since different developers are working on features and merging them to develop, we could also merge new features in develop, which works good. But when we want to merge development into main, GitLab refuses and sees merge conflicts, because it is 2 commits behind.
FYI: In GitLab a merge-request uses a classical “merge request” no ff or similar.
I am confused, that this seems so hard to solve, because I thought that is the basic idea of Gitflow
Has someone an idea?
Thanks in advance.