Hi I am working in Magento cloud when merging the code from staging to production i am getting merge conflict issue

Preparing to merge environment 'staging' into master Checking out repository Executing merge Auto-merging .magento/routes.yaml CONFLICT (content): Merge conflict in .magento/routes.yaml Automatic merge failed; fix conflicts and then commit the result. E: Error: Unable to merge, resolve the conflict manually.

Please help me if anyone know how to solve.

1 Answer 1


This is very old question, But I got the same error today and this is how - I solved it. This may not the appropriate solution.

  1. Take a full Backup of the Branch or Master Branch using

    git clone ssh://[email protected]/path/to/my-project.git

  2. Checkout Branch (Merge from Stage - Production)

    git checkout Production

  3. Merge Using Strategy Option & Allow Unrelated History

    git merge origin/staging --strategy-option theirs --allow-unrelated-histories

  4. Push to Production (Forcefully)

    git add . && git push origin production -f

After this you will see the Production Branch is updated with Staging Branch Updates.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.