Merge blocked: merge conflicts must be resolved

Viewed 4760

I am trying to merge my master branch to a production branch in Gitlab for my CI/CD pipeline.

I get a warning that the source branch is 1 commit behind the target branch. I tried the recommended fix from gitlab(Here and Youtube), but I am having no luck.

In my local environment, I created a production branch. I tried to merge my master to production, but continue to get errors. These are some of the commands I have been using(not in that order) that have been ineffective.

git pull master production --allow-unrelated-histories
git ls-tree production
git config pull.rebase false
git ls-tree production
git rebase master/production
git push -u  origin production
git merge --no-ff 'master'
git rebase --continue

enter image description here

Thanks in advance

1 Answers

You would need at least to make sure you are in the right branch before any merge:

git fetch
git switch production
git pull production
git merge --no-ff master
git push

That would update production first, then merge master to it.
And it does not prevent possible conflicts to be resolved during the merge.

Related