Merge Conflicts on Flexible Environments
Merge conflicts can happen when the same schema has been modified in both the flexible environment and the mainline environment it's connected to.
Last updated
Was this helpful?
Merge conflicts can happen when the same schema has been modified in both the flexible environment and the mainline environment it's connected to.
Last updated
Was this helpful?
A merge conflict happens when a file or item contains conflicting changes in more than one environment during deployment.
This guide explains how to resolve these merge conflicts and how to avoid them.
The image below shows a merge conflict when pulling from the mainline environment to a flexible environment.
To start debugging the merge conflict, a log file containing a list of conflicting files is provided. It's a .txt
file that can be downloaded and viewed.
Before you start resolving the merge conflict, ensure you have the following things ready:
The log file containing a list of the conflicting files.
The clone link for the flexible (source) environment.
The clone link for the mainline (target) environment that flexible environment is connected to.
An editor that provides Git tools for handling merge conflicts (like Visual Studio Code).
Download the log file provided from the failed pull (see image above).
Use the mainline environment clone link to add a new git remote
:
Fetch the master
from the added remote:
Merge the master
into the local clone.
Open the cloned files in your favorite editor that also provide Git tools.
Go through the conflicting files one by one.
Stage and commit the resolved conflicts.
Push the change back to the flexible environment.
Once the push to the flexible environment is complete, verify that the merge was successful.
The final thing needed to be done is to complete the deployment to the mainline environment.
A flexible environment is attached to a single mainline environment. Changes cannot be deployed from the flexible to the mainline environment, before changes from the mainline are pulled into the flexible environment.
Merge conflicts can be avoided by following these guidelines on the flexible environment:
Only work on schema specific to a single feature.
Do not make changes to schema regularly changed in the mainline environment.
Clone the flexible environment .
In case you do not see your changes reflected on the flexible environment, from the Umbraco backoffice. This will give you an idea of what is wrong enabling you to resolve it.
Learn more about how flexible environments work in the article.