-
Notifications
You must be signed in to change notification settings - Fork 811
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ec519fa
Started merge conflict article ++
sofietoft 41ca1ee
Updates to Restore README article
sofietoft 7772a37
Finish steps for resolving merge conflicts
sofietoft b11dff3
Fix long sentence
sofietoft 558409a
Add note about schema issues
sofietoft 90d0d93
Links and more
sofietoft 7c4e062
Update README.md
sofietoft 09778c1
Update README.md
sofietoft 813d34a
Update partial-restore.md
sofietoft 407fbda
Update merge-conflicts-on-flexible-environments.md
sofietoft 289a552
Update merge-conflicts-on-flexible-environments.md
sofietoft c0df49f
Update merge-conflicts-on-flexible-environments.md
sofietoft 438c154
Update merge-conflicts-on-flexible-environments.md
sofietoft 91f95e1
Update merge-conflicts-on-flexible-environments.md
sofietoft e0f652c
Update merge-conflicts-on-flexible-environments.md
sofietoft 6d13a8c
Added source and target to the environment names under preparations
sofietoft fd3989b
Apply suggestions from code review
sofietoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions
72
...o-cloud/troubleshooting/deployments/merge-conflicts-on-flexible-environments.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| --- | ||
| description: Merge conflicts can happen when the same schema has been modified in both the flexible environment and the mainline environment it's connected to. | ||
| --- | ||
|
|
||
| # Merge Conflicts on Flexible Environments | ||
|
|
||
| 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. | ||
|
|
||
| ## Resolving a Merge Conflict in a Flexible Environment | ||
|
|
||
| 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. | ||
|
|
||
| ### 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 (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). | ||
|
|
||
| ### 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`: | ||
|
|
||
| ```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 be done is to complete the deployment to the mainline environment. | ||
|
|
||
| {% 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 %} | ||
|
|
||
| ## Avoiding Merge Conflicts in a Flexible 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. | ||
|
|
||
| Learn more about how flexible environments work in the [Flexible Environments](../../getting-started/flexible-environments.md) article. | ||
|
|
||
| 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.