-
Notifications
You must be signed in to change notification settings - Fork 813
New article: Merge Conflicts on Flexible Environments #7013
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
ec519fa
41ca1ee
7772a37
b11dff3
558409a
90d0d93
7c4e062
09778c1
813d34a
407fbda
289a552
c0df49f
438c154
91f95e1
e0f652c
6d13a8c
fd3989b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| description: Merge conflicts can happen on a flexible environment when the same schema has been changed in both the source and target environment. | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| # Merge Conflicts on Flexible Environments | ||
|
|
||
| A merge conflicts happens when one file or item contains changed in more than one instance that's part of a deployment. | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This guide explains how to resolve these merge conflicts and how to avoid them. | ||
|
|
||
| ## How to Resolve a Merge Conflict on a Flexible Environment | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The image below shows a merge conflict happening on a pull from the mainline environment to a flexible environment. | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|  | ||
|
|
||
| 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. | ||
|
|
||
| ### Preparations | ||
|
|
||
| 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 environment. | ||
| * The clone link for the mainline environment that flexible environment is connected to. | ||
|
||
| * An editor that provides Git tools for handling merge conflicts (like Visual Studio Code). | ||
|
|
||
| ### Steps | ||
|
|
||
| 1. Download the log file provided from the failed pull (see image above). | ||
| 2. Clone the flexible environment [to your local machine](../../set-up/working-locally.md). | ||
| 3. Use the mainline environment clone link to add a new `git remote: | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```git | ||
| git remote add [mainline environment name] [mainline environment clone link] | ||
| ``` | ||
|
|
||
| 4. Fetch the `master` from the added remote: | ||
|
|
||
| ```git | ||
| git fetch [mainline environment name] master | ||
| ``` | ||
|
|
||
| 5. Merge the `master` into the local clone. | ||
|
|
||
| ``` | ||
| git merge [mainline environment name]/master | ||
| ``` | ||
|
|
||
| 6. Open the cloned files in your favorite editor that also provide Git tools. | ||
| 7. Go through the conflicting files one by one. | ||
| 8. Stage and commit the resolved conflicts. | ||
| 9. 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 do, is to complete the deployment to the mainline environment. | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| {% hint style="info" %} | ||
| In case you do not see your changes reflected on the flexible environment, [update the schema manually](../../deployment/deploy-dashboard.md#update-umbraco-schema-from-data-files) from the Umbraco backoffice. This will give you an idea of what is wrong enabling you to resolve it. | ||
| {% endhint %} | ||
|
|
||
| ## How to Avoid Merge Conflicts on a Flexible Environment | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| 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. | ||
|
|
||
| Learn more about how flexible environments work in the [Flexible Environments](../../getting-started/flexible-environments.md) article. | ||
|
|
||
| Merge conflicts can avoid by following these guidelines on the flexible environment: | ||
sofietoft marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| * Only work on schema specific to a single feature. | ||
| * Do not make changes to schema regularly changed in the mainline environment. | ||
Uh oh!
There was an error while loading. Please reload this page.