So I have three branches in total deploy release and main
Each of this represents a environment to be deployed on
Branches: deploy --> release --> main
Environments: dev uat PROD
Now the dev branch is a non-protected branch, means you can push and do all sort of stuff on it
But my release and main branches are protected branches which only accepts merges from other branch
Whenver I have problems when merging from dev to release I can directly commit the changes to the dev branch
Problem is that whenever I do release to main I get conflicts which I can't directly commit to release
Could anyone suggest how I work with this
If it helps, this is on GitLab
Thanks in advance
I searched online that you should create another branch through release, and then merge main into release and fix the conflicts
But the moment I go to merge this new branch to release it doesn't show me any changes (Reason being that always the lower branches would have the updated code)
And after that I would assume that my Merge Request would be deployed but that is still blocked
Create an unprotected work branch, and solve your merge conflicts in that branch.
Here is an illustration for the "merge
mainintorelease" action:release:maininto that branch:fix the conflicts in that work branch
releasethat merge request should be ok -- i.e: no conflicts there.