0

During a push request from a feature branch to a testing branch, a gitlab ci/cd pipeline is triggered in which the parser components are validated and combined by a ci/cd runner - this frequently leads to merge conflicts.

More information: I have a repository in which users are working on separate components of a parser. During a push request from a feature branch to a testing branch, a gitlab ci/cd pipeline is triggered in which the parser components are validated and combined by a ci/cd runner. The problem is that if a feature branch is created later but finished earlier than another branch, merge conflicts arise due to this combined file. I am trying to find a solution that prevents merge conflicts pertaining to the combined file but does not mask any other merge conflicts.

I have considered git pull --rebase & git push origin --force but am worried that any valid merge conflicts may be suppressed.

Dion
  • 21
  • 3
  • Does this answer your question? [Git says "Automatic merge failed", what does it mean?](https://stackoverflow.com/questions/49590460/git-says-automatic-merge-failed-what-does-it-mean) – Michael Delgado Nov 10 '22 at 16:32
  • In short, yes, you should be worried. That’s why git raised an error. Git tries to automatically merge your code. But it’s cautious, and if there are conflicts the merge strategy thinks are ambiguous, it will raise an error. So you need to resolve them manually. That’s just the reality of source control. The best strategy is to pair this with good automated test coverage and then you can be reasonably sure the merge didn’t break anything. – Michael Delgado Nov 10 '22 at 16:36
  • @MichaelDelgado - Thanks for your response, but both your comments refer to general cases of merge conflicts and not this specific situation concerning a CI pipeline... – Dion Nov 17 '22 at 07:46
  • But I’m saying this doesn’t exist at all. The fact that it doesn’t exist in the context of a CI pipeline is a subset. – Michael Delgado Nov 17 '22 at 11:57

0 Answers0