Skip to content

Commit 7772a37

Browse files
committed
Finish steps for resolving merge conflicts
1 parent 41ca1ee commit 7772a37

File tree

2 files changed

+44
-7
lines changed

2 files changed

+44
-7
lines changed
118 KB
Loading

umbraco-cloud/troubleshooting/deployments/merge-conflicts-on-flexible-environments.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,50 @@ This guide explains how to resolve these merge conflicts and how to avoid them.
1010

1111
## How to Resolve a Merge Conflict on a Flexible Environment
1212

13-
1. Clone the flexible environment to your local machine.
14-
2. Add a `git remote` to the cloned environment.
15-
3. Fetch the `master` from the added remote.
16-
4. Merge the `master` into the local clone.
17-
5. Go through the conflicts one by one.
18-
6. Commit the resolved conflicts.
19-
7. Push the change back to the flexible environment.
13+
The image below shows a merge conflict happening on a pull from the mainline environment to a flexible environment.
14+
15+
![Pulling changes from the mainline environment failed](images/pulling-failed.png)
16+
17+
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.
18+
19+
### Preparations
20+
21+
Before you start resolving the merge conflict, ensure you have the following things ready:
22+
23+
* The log file containing a list of the conflicting files.
24+
* The clone link for the flexible environment.
25+
* The clone link for the mainline environment that flexible environment is connected to.
26+
27+
### Steps
28+
29+
1. Download the log file provided from the failed pull (see image above).
30+
2. Clone the flexible environment [to your local machine](../../set-up/working-locally.md).
31+
3. Use the mainline environment clone link to add a new `git remote:
32+
33+
```git
34+
git remote add [mainline environment name] [mainline environment clone link]
35+
```
36+
37+
4. Fetch the `master` from the added remote:
38+
39+
```git
40+
git fetch [mainline environment name] master
41+
```
42+
43+
5. Merge the `master` into the local clone.
44+
45+
```
46+
git merge [mainline environment name]/master
47+
```
48+
49+
6. Open the cloned files in your favorite editor containing Git tools.
50+
7. Go through the conflicting files one by one.
51+
8. Stage and commit the resolved conflicts.
52+
9. Push the change back to the flexible environment.
53+
54+
Once the push to the flexible environment is complete, verify that the merge was successful.
55+
56+
The final thing needed to do, is to complete the deployment to the mainline environment.
2057

2158
## How to Avoid Merge Conflicts on a Flexible Environment
2259

0 commit comments

Comments
 (0)